3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

IP固定の時、DNSの指定もする

Last updated at Posted at 2013-08-30

/etc/resolv.conf が勝手に書き換わって困っていたので調べてみました。
参考

/etc/network/interfaces
auto eth0
iface eth0 inet static
    address 192.168.11.191
    netmask 255.255.255.0
    gateway 192.168.11.1
    dns-nameserver 192.168.11.254 8.8.8.8 8.8.4.4
    dns-search local

と記述し、$sudo /etc/init.d/networking restartすると、

/etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 192.168.11.254
nameserver 8.8.8.8
nameserver 8.8.4.4
search local
3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?