1.修改文件 /etc/network/interfaces
┌──(kali㉿kali)-[~] └─$ sudo vi /etc/network/interfaces # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). source /etc/network/interfaces.d/* # The loopback network interface auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.2.8 netmask 255.255.255.0 gateway 192.168.2.1
2.修改文件/etc/resolv.conf
┌──(kali㉿kali)-[~] └─$ sudo vi /etc/resolv.conf # Generated by NetworkManager nameserver 192.168.2.1 nameserver 8.8.8.8 nameserver 114.114.114.114
3.重启sudo reboot
标签:IP,network,kali,interfaces,sudo,192.168,etc,linux From: https://www.cnblogs.com/sookooj/p/17759169.html