centos 7修改方式:
hostnamectl set-hostname hostuser
reboot
或者直接vi /etc/hostname
添加内容:
hostuser
检查修改效果
[chenquan@hostuser ~]$ hostname
hostuser
[chenquan@hostuser ~]$ cat /etc/hostname
hostuser
[chenquan@hostuser ~]$
centos 7修改方式:
hostnamectl set-hostname hostuser
reboot
或者直接vi /etc/hostname
添加内容:
hostuser
检查修改效果
[chenquan@hostuser ~]$ hostname
hostuser
[chenquan@hostuser ~]$ cat /etc/hostname
hostuser
[chenquan@hostuser ~]$
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。