使用vmware虚拟机
首先 配置 apt的source.list ustc的源在国内速度不错
deb https://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib deb-src https://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib
然后安装linux内核头文件
apt install linux-headers-$(uname -r)
如果出现以下错误提示
Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package linux-headers-XXX-kali2-amd64 E: Couldn't find any package by glob 'linux-headers-XXX-kali2-amd64' E: Couldn't find any package by regex 'linux-headers-XXX-kali2-amd64'
就得更新内核版本(下面的版本是发表这篇博客时的版本,读者看到的可能与这里列出的不同)
apt-cache search linux-headers linux-headers-4.18.0-kali2-all - All header files for Linux 4.18 (meta-package) linux-headers-4.18.0-kali2-all-amd64 - All header files for Linux 4.18 (meta-package) linux-headers-4.18.0-kali2-amd64 - Header files for Linux 4.18.0-kali2-amd64 linux-headers-4.18.0-kali2-cloud-amd64 - Header files for Linux 4.18.0-kali2-cloud-amd64 linux-headers-4.18.0-kali2-common - Common header files for Linux 4.18.0-kali2 linux-headers-4.18.0-kali2-common-rt - Common header files for Linux 4.18.0-kali2-rt linux-headers-4.18.0-kali2-rt-amd64 - Header files for Linux 4.18.0-kali2-rt-amd64 linux-headers-amd64 - Header files for Linux amd64 configuration (meta-package) linux-headers-cloud-amd64 - Header files for Linux cloud-amd64 configuration (meta-package) linux-headers-rt-amd64 - Header files for Linux rt-amd64 configuration (meta-package)
找到有头文件的内核版本 linux-headers-4.18.0-kali2-amd64 然后执行
apt install linux-image-4.18.0-kali2-amd64 apt install linux-headers-4.18.0-kali2-amd64 reboot
如果没有错误提示,直接进行这一步
apt install realtek-rtl88xxau-dkms reboot
重启之后输入
cat /proc/net/dev
iwconfig
如果出现wlanX则说明无线网卡驱动已经正常工作