ubuntu设置ip地址和dns

vim /etc/network/interfaces

修改完ip地址,网关,子网掩码等之后

/etc/init.d/networking restart

 

vim /etc/resolvconf/resolv.conf.d/base

在里面插入:
nameserver 8.8.8.8
nameserver 8.8.4.4

/etc/init.d/networking restart

/etc/init.d/resolvconf restart

 

你可能感兴趣的:(技术)