18.24 Ubuntu修改静态IP

1.查询系统当前的ip地址配置信息,输入ifconfig命令进行查看

2.打开文件设置静态IP

sudo vi /etc/network/interfaces

3.设置address ip、gateway、netmask。

auto lo
iface lo inet loopback
auto eth4
iface eth4 inet static
address 10.3.10.232
netmask 255.255.255.0
gateway 10.3.10.254

4.重启网卡

sudo /etc/init.d/networking restart

5.再输入ifconfig查询系统当前的ip地址,是否配置成功。


猜你喜欢

转载自www.cnblogs.com/baixu/p/10651198.html