3
5

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.

Linuxホスト名変更

Posted at

Linuxサーバのホスト名を変更したい場合、以下の作業を実施します。

###1.現状のホスト名を変更

$sudo hostname 新しいホスト名

###2.ホスト名を確認

$hostname

***以上の作業だけでは、再起動すると元のホスト名に戻ってしまいます***
###3.ネットワークにおけるホスト名の変更

$sudo vi /etc/sysconfig/network
パスワードを入力
NETWORKING=yes
HOSTNAME=新しいホスト名

###4.ホスト名を確認
・再起動を行います

$sudo shutdown -r now
$hostname

以下サイトを参考にしました。
http://mountainbigroad.jp/linux/host_mod.html

3
5
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
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?