说起linux的网卡配置文件,大家第一时间想起的就是
/etc/sysconfig/network-scripts/ifcfg-网卡名称
但是kali虚拟机就不一样,接下来我给说一下
kali虚拟机网卡配置文件路径
/etc/network/interfaces
1.配置文件解读
auto eth0 # auto表示开机启动该网卡设备
iface eth0 inet dhcp # 使用dhcp分配地址 (如果使用dhcp分配,以下三条语句直接注释就好)
iface eth0 inet static #使用静态地址
address 192.168.1.2/24 #静态IP地址/子网掩码
gateway 192.168.1.1 #网关地址
2.配置静态ip步骤
说明:我选择的网卡是VMnet1(网段是192.168.5.0/24)
1.进入配置文件
vim /etc/network/interfaces
2.修改配置文件