一、Debian静态IP
1、使用vim打开/etc/network/interfaces配置文件
vim /etc/network/interfaces
2、在配置文件里添加
auto 网卡号
allow-hotplug 网卡号
iface 网卡号 inet static
address IP地址
auto ens33
allow-hotplug ens33
iface ens33 inet static
address 172.16.100.254/24
3、网卡重启
在Debian里好多网卡重启的命令都不可用经过测试以后只有这个还凑合,要是重启过后还不行,建议重启虚拟机
/etc/init.d/networking restart