centOS7修改主机名
程序员文章站
2022-03-12 21:18:28
...
阿里云ecs上centOS的名字太长了,然后看上去比较乱,于是,改一下名字:
[[email protected] root]$ hostnamectl set-hostname centOS7
==== AUTHENTICATING FOR org.freedesktop.hostname1.set-static-hostname ===
Authentication is required to set the statically configured local host name, as well as the pretty host name.
Authenticating as: root
Password:
==== AUTHENTICATION COMPLETE ===
[[email protected]fz root]$
改完后,重新ssh登陆:
➜ htdocs ssh [email protected]
[email protected]'s password:
Last login: Sun May 6 00:32:58 2018
Welcome to Alibaba Cloud Elastic Compute Service !
[[email protected] ~]$
[[email protected] ~]$
[[email protected] ~]$
还是新名字看着舒服。
附加:以前总认为linux上密码不出现*号是反人类设计,和thinkPHP3上的单字母函数平起平坐(虽然主流观点上有一大堆各种言之凿凿的理由)。但是,现在看上面的复制,总有一种莫名其妙的美感。
上一篇: centos7修改主机名
下一篇: Toad 乱码的问题 OracleXP