LoginSignup
33
33

More than 5 years have passed since last update.

Ubuntu14.04でホスト名を変更する

Posted at

Ubuntu14.04でホスト名を変更した時の手順メモ。

1. /etc/hostnameの編集

/etc/hostnameに変更したいホスト名をエディタ等で書く

$ sudo vim /etc/hostname

2. /etc/hostsの編集

/etc/hostsで、現在のホスト名が書かれている箇所を変更したいホスト名に修正する

$ sudo vim /etc/hosts

3. 再起動

rebootする

$ sudo reboot

再ログイン後、ホスト名が変わっている

※ 参考
- Debian/Ubuntu でインストール後にホスト名を変更する方法 - tatsuyaoiw.hatenablog.com
- Linux:ホスト名の変更方法 | サイト運営の私的メモ

33
33
1

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