Ubuntu18配置静态IP

1.相关命令

gedit /etc/network/interfaces
------------------------------内 容------------------------------
# interfaces(6) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 10.0.0.200
netmask 255.255.255.0
gateway 10.0.0.2
dns-nameservers 10.0.0.2
------------------------------内 容------------------------------
/etc/init.d/networking restart

 

posted @ 2018-07-27 00:29  坚持就是胜利66  阅读(1273)  评论(0)    收藏  举报