LoginSignup
3
4

More than 5 years have passed since last update.

デスクトップ版Ubuntuでネットワーク設定

Posted at

経緯

  • UbuntuでGUI上で固定IPを降った後に,作業をしていたらDNSエラーが出たので困った

結論

$ sudo emacs /etc/network/interfaces
$ sudo emacs /etc/resolvconf/resolv.conf.d/base
を書き直した後,
$ sudo resolvconf -u
で設定を更新する

メモ: それぞれの書き方

/etc/network/interfaces

interface
auto eth0
iface eth0 static  ←dhcpをstaticに変更する
address 192.168.5.10 ←固定するIPアドレス
netmask 255.255.255.0 
network 192.168.5.0
broadcast 192.168.5.255
gateway 192.168.5.1
dns-nameservers hoge fuga

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

nameserver hoge ← DNSサーバアドレス
nameserver fuga

ぼやき

  • けっこうIP設定してから日にち立ってたのに,pip installが失敗するまできづかなかったのつらい
3
4
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
4