linux Host Rename

Label: I. View Linux hostname
[root @localhost ~]# hostname
localhost.localdomain

ii. Rename hostname (in the case of new host name h4ckg3h2y1)
Step 1:
[root @localhost ~]# hostname h4ckg3h2y1
Step 2: Modify the /etc/ sysconfig/network configuration file to use a new hostname for next restart
Edit / etc/ sysconfig/network file, modify HOStNAME=h4ckg3h2y1
Step 3: Modify the domain parsing file/ etc/ hosts to enable the application to interpret the new hostname
127.0.0.1   h4ckg3h2y1 localhost
::1         h4ckg3h2y1 localhost

未经允许不得转载:萌萌Apprentissage » linux Host Rename

Like (0) 打赏

Comments 0

Protected with IP Blacklist CloudIP Blacklist Cloud
  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏

//下一个脚本特效
//下一个脚本