Ubuntu设置静态IP的方法

Posted JimmyTY

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Ubuntu设置静态IP的方法相关的知识,希望对你有一定的参考价值。

通过修改配置文件/etc/network/interfaces,如果/etc/resolv.conf中提示nameserver会被resolvconf修改,是临时文件,那么dns server也可以在/etc/network/interfaces文件中配置。

具体方法如下:

auto eth0
iface eth0 inet static address
192.168.3.3 netmask 255.255.255.0 gateway 192.168.3.1 dns-nameservers 192.168.3.45 192.168.8.10

 

以上是关于Ubuntu设置静态IP的方法的主要内容,如果未能解决你的问题,请参考以下文章