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

猜你喜欢

转载自www.cnblogs.com/jcjssl/p/9375242.html