linux/kali2024.4工具集合

1 系统硬件信息查询 && 必备命令 && 快捷键

arch 显示机器的处理器架构(1)
uname -m 显示机器的处理器架构(2)
uname -r 显示正在使用的内核版本
dmidecode -q 显示硬件系统部件 - (SMBIOS / DMI)
hdparm -i /dev/hda 罗列一个磁盘的架构特性
hdparm -tT /dev/sda 在磁盘上执行测试性读取操作
cat /proc/cpuinfo 显示CPU info的信息
cat /proc/interrupts 显示中断
cat /proc/meminfo 校验内存使用
cat /proc/swaps 显示哪些swap被使用
cat /proc/version 显示内核的版本
cat /proc/net/dev 显示网络适配器及统计
cat /proc/mounts 显示已加载的文件系统
lspci -tv 罗列 PCI 设备
lsusb -tv 显示 USB 设备 
  • must
sudo apt-get install -f
#-f:代表“fix”或“fix-broken”。它指示apt-get尝试纠正一个有损坏的依赖关系的系统。
#sudo apt --fix-broken install#更新过程中出现依赖关系错误
  • 快捷键
    Ctrl + Alt + T 打开终端
    Ctrl + Alt + L 锁屏
    Ctrl + Alt + Del 关闭当前会话
    Ctrl + Shift + Esc 打开任务管理器
    Alt + Tab 切换应用程序
    Ctrl + Alt + F1~F6 在不同的虚拟终端之间切换
    Ctrl + C 终止当前正在运行的命令
    Ctrl + D 关闭终端会话
    Tab 命令自动补全
    Arrow Up/Down 查看历史命令
    Ctrl + Shift + T 在终端中打开新的选项卡
    Ctrl + Shift + W 关闭当前终端选项卡
    Ctrl + Shift + N 在文件管理器中打开新的窗口
    Ctrl + Shift + Q 退出当前会话
    Ctrl + Shift + Alt + Left/Right Arrow 在不同的工作区之间切换
    Ctrl + L 清空终端屏幕
    Ctrl + Z 暂停当前正在运行的命令
    Ctrl + R 在历史命令中进行反向搜索
    Ctrl + U 清空当前命令行输入
    Ctrl + W 删除光标前的一个单词

2 网络配置

  • ssh
sudo mousepad /etc/ssh/sshd_config

# fins line 33 38 #PermitRootLogin prohibit-password #PubkeyAuthentication yes .
# and delete "#"
PermitRootLogin yes
PubkeyAuthentication yes
  • The loopback network interface网络配置
sudo mousepad /etc/network/interfaces    
#auto eth0
#iface eth0 inet dhcp

auto eth0
iface eth0 inet static  
address 192.168.0.30
netmask 255.255.255.0
gateway 192.168.0.1
  • 三类IP地址ABC类的划分
A类地址
⑴ A类地址第1字节为网络地址,其它3个字节为主机地址。另外第1个字节的最高位固定为0。
⑵ A类地址范围:1.0.0.1到126.255.255.254。
⑶ A类地址中的私有地址和保留地址:
①10.0.0.0到10.255.255.255是私有地址(所谓的私有地址就是在互联网上不使用,而被用在局域网络中的地址)。
② 127.0.0.0到127.255.255.255是保留地址,用做循环测试用的。
B类地址
⑴ B类地址第1字节和第2字节为网络地址,其它2个字节为主机地址。另外第1个字节的前两位固定为10。
⑵ B类地址范围:128.0.0.1到191.255.255.254。
⑶ B类地址的私有地址和保留地址
① 172.16.0.0到172.31.255.255是私有地址
②169.254.0.0到169.254.255.255是保留地址。如果你的IP地址是自动获取IP地址,而你在网络上又没有找到可用的DHCP服务器,这时你将会从169.254.0.0到169.254.255.255中临得获得一个IP地址。
C类地址
⑴C类地址第1字节、第2字节和第3个字节为网络地址,第4个个字节为主机地址。另外第1个字节的前三位固定为110。
⑵ C类地址范围:192.0.0.1到223.255.255.254。
⑶ C类地址中的私有地址:192.168.0.0到192.168.255.255是私有地址。
  • 域名解析
sudo mousepad /etc/resolv.conf
nameserver 192.168.0.254
nameserver 114.114.114.114
nameserver 8.8.8.8

or

sudo echo nameserver 8.8.8.8
nameserver 114.114.114.114
>> /etc/resolv.conf
  • 锁定文件
    • 修改是即时生效的,下一次解析就会使用配置的dns服务器解析域名
      直接修改该文件的话,会在下一次重启时失效。简单的解决办法,锁定文件
sudo chattr +i /etc/resolv.conf
  • 重启网络服务
sudo /etc/init.d/networking restart
# or
sudo systemctl restart networking
  • vmtools
sudo apt update
sudo apt install open-vm-tools open-vm-tools-desktop

3 换源

sudo mousepad /etc/apt/sources.list
# See https://www.kali.org/docs/general-use/kali-linux-sources-list-repositories/
# deb http://http.kali.org/kali kali-rolling main contrib non-free non-free-firmware
# Additional line for source packages
# deb-src http://http.kali.org/kali kali-rolling main contrib non-free non-free-firmware
## add China
# 官方源
# deb http://http.kali.org/kali kali-rolling main non-free non-free-firmware contrib
# deb-src http://http.kali.org/kali kali-rolling main non-free non-free-firmware contrb

# 校园联合镜像站(自动就近大学位置固定)支持ipv6
#deb https://mirrors.cernet.edu.cn/kali kali-rolling main non-free non-free-firmware contrib
#deb-src https://mirrors.cernet.edu.cn/kali kali-rolling main non-free non-free-firmware contrib
# 腾讯(自动就近不固定)支持ipv6(mirrors.tencent.com)仅ipv4
#deb https://mirrors.cloud.tencent.com/kali kali-rolling main non-free non-free-firmware contrib
#deb-src https://mirrors.cloud.tencent.com/kali kali-rolling main non-free non-free-firmware contrib
# 阿里(自动就近不固定)支持ipv6
deb https://mirrors.aliyun.com/kali kali-rolling main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/kali kali-rolling main non-free non-free-firmware contrib
# 华为(北京)仅ipv4
#deb https://mirrors.huaweicloud.com/kali/ kali-rolling main non-free
#deb-src hhttps://mirrors.huaweicloud.com/kali/ kali-rolling main non-free
#清华大学
#deb http://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling main contrib non-free 
#deb-src https://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling main contrib non-free
#中科大
#deb http://mirrors.ustc.edu.cn/kali kali-rolling main non-free non-free-firmware contrib
#deb-src http://mirrors.ustc.edu.cn/kali kali-rolling main non-free non-free-firmware contrib
#浙大
#deb http://mirrors.zju.edu.cn/kali kali-rolling main contrib non-free
#deb-src http://mirrors.zju.edu.cn/kali kali-rolling main contrib non-free
#东软大学
#deb http://mirrors.neusoft.edu.cn/kali kali-rolling/main non-free contrib
#deb-src http://mirrors.neusoft.edu.cn/kali kali-rolling/main non-free contrib
#重庆大学
#deb http://http.kali.org/kali kali-rolling main non-free contrib
#deb-src http://http.kali.org/kali kali-rolling main non-free contrib
  • use
sudo apt update # 更新软件包的索引源
sudo apt  -y upgrade #升级所有软件包
sudo apt install --only-upgrade  # only update one pakeage maybe is the best choose只更新一个包可能是最好的选择
sudo apt -y dist-upgrade && reboot #升级整个linux系统
#确保一整个体系打所有相关依赖彻底的完成这件时期可以选择清空,然而linux的包或者相关打环境所占用打空间都极小 尽可能打不去清理同时也没必要冒风险
sudo apt autoremove

蓝牙(bluetooth for linux )

  • Kali Linux
  • Kali Linux默认状态下并没有启动蓝牙服务,如果尝试打开蓝牙管理器会提示Bluez守护进程没有运行,不能继续。应用下列指令开启蓝牙服务:
sudo service bluetooth start
# 不建议自启动 sudo systemctl enable my_service
  • 开启蓝牙服务后右上角状态栏出现了蓝牙图标。

  • 点击蓝牙图标并选择“设置新设备“。

  • 此时配对目标蓝牙设备,这时不会出现问题。

  • 此时可能会出现“Device successfully added.But failed to connect.”

  • 这个问题并不是蓝牙协议或者其他原因造成的。

  • 造成它的原因仅仅是Blueman-manager本身。

sudo bluetoothctl	#进入蓝牙管理进程。
trust #MAC地址
connect #MAC地址(这里一样是刚刚复制好的MAC地址)
#ubuntu
sudo systemctl enable bluetooth
sudo systemctl start bluetooth
# centos/redhat
sudo yum install bluez
sudo systemctl enable bluetooth	
sudo systemctl start bluetooth
# MacOS
system_profiler SPBluetoothDataType
syst
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值