LoginSignup
7
8

More than 5 years have passed since last update.

ubuntuのdns設定

Last updated at Posted at 2014-03-18

/etc/network/interfacesに以下のように追記

dns-nameservers $dns_server_addr
dns-domain $domain_name

この後以下のコマンドを実行

sudo /etc/init.d/networking restart

serviceからいけるような気もするけど、とりあえずこれでうまくいったのでOK
くれぐれも/etc/resolv.confを直接編集しない(上書きされるので)

2014-03-20追記

resolvconf/resolv.conf.d/

以下のファイルに設定する方法もある。
resolv.conf.d以下のファイルにsearch、domainなどの指定をした上で、

resolvconf -u

でresolv.confに反映される。
こっちの方が本式か?

7
8
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
7
8