Ubuntu 16.04修改配置静态IP和DNS

Ubuntu 16.04修改配置静态IP和DNS

1.修改interfaces 文件

sudo gedit /etc/network/interfaces

2.添加 例如:

auto enp0s25
iface enp0s25 inet static
address 192.168.9.81
netmask 255.255.255.0 
gateway 192.168.9.108

# dns配置
dns-nameservers 8.8.8.8
dns-search pcat

3.重启电脑

posted on 2018-04-21 10:37  小明在线  阅读(387)  评论(0编辑  收藏  举报

导航