ubuntu配置静态IP和DNS

来源:互联网 发布:网络女作家收入排行榜 编辑:程序博客网 时间:2024/05/29 11:18

1、在终端执行 vim /etc/network/interfaces   在文件中加入如下内容,网关要写上

auto eth0
iface eth0 inet static
address  192.167.3.3
netmask 255.255.240.0
gateway  192.167.3.1


2、执行 vim /etc/NetworkManager/NetworkManager.conf     将managed=false 改成true


3、执行vim /etc/resolvconf/resolv.conf.d/base 然后加入 nameserver 你的DNS服务器IP   

4、重启机器。



0 0
原创粉丝点击