ubuntu如何设置静态IP? 设置静态IP 1.编辑/etc/network/interfaces文件: # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). source /etc/network/interfaces.d/* # The loopback network
一.Ubuntu16.04设置静态IP1.获取网卡的名字 ip route show 2.获取网卡的名字 vim /etc/network/interfaces auto ens33 iface ens33 inet static address 192.168.23.43 netmask 255.255.255.0 gateway 192.168.23.1 dns-nameserver 114.114.114.114 3.设置DNS sudo vi /etc/resolvconf/reso
ubuntu14.04 设置静态ip vim /etc/network/interfaces 原来只有 auto lo iface lo inet loopback 修改成如下: auto lo iface lo inet loopback auto eth0 iface eth0 inet static #静态ip address 192.168.1.6 #要设置的ip gateway 192.168.1.1 #这个地址需要自己确认 netstat -rn 第一列为0.0.0.0对应的gate