LoginSignup
1
2

More than 5 years have passed since last update.

hostnameの変更

Posted at

hostnameを変更する方法

hostsファイルを変更する

$ vim /etc/hosts 
127.0.0.1       test01 localhost.localdomain localhost
↓
127.0.0.1       test02 localhost.localdomain localhost

networkファイルを変更する

vim /etc/sysconfig/network
HOSTNAME=test01
↓
HOSTNAME=test02

hostnameコマンドで変更(hostname {変更したいhostname})

$ hostname test02

再度、ログインした際にhostnameが変わっていれば完了です!

1
2
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
1
2