- 大家都很忙,直接上菜
- CentOS 7/Redhat 7 以上版本
shell> hostnamectl set-hostname 名称 shell> su
- 7以下版本
shell> # 永久修改hostname,重启之后生效 shell> echo "名称" >> /etc/sysconfig/network shell> # 临时修改hostname,结合上面的命令,达到永久修改hostname的目的 shell> hostname 名称
linux永久修改hostname
猜你喜欢
转载自blog.csdn.net/weixin_38011805/article/details/112528113
今日推荐
周排行