ubuntu配置静态IP地址

在VM下为ubuntu配置静态IP地址

Posted by jxb2018 on February 28, 2019

1.查看网卡名称

iwconfig

2.切换到root

su root

3.修改配置文件

vi /etc/network/interfaces

修改为:

auto eth0
iface eth0 inet static
address 192.168.8.100    
netmask 255.255.255.0
gateway 192.168.8.2
dns-nameserver 119.29.29.29

4.重启网络

sudo /etc/init.d/networking restart