Linux的hostname有时候有些作用,比如在shell中显示用户名@主机名。
临时改变hostname
[root@localhost ~]# hostname # show current hostname localhost.localdomain [root@localhost ~]# hostname domain # change hostname [root@localhost ~]# hostname domain
永久改变hostname
[root@localhost ~]# vi /etc/hostname # change domain [root@localhost ~]# exit 重新登录 [root@domain ~]# hostname domain
声明:未经允许禁止转载 东东东 陈煜东的博客 文章,谢谢。如经授权,转载请注明: 转载自东东东 陈煜东的博客
发表评论