更改主机名:
[root@localhost]#hostnamectl set-hostname \>test1 // 输入“\”符号来转移Enter字符,更改主机名为test1.
[root@localhost]#bash // 执行命令。
[root@test1]#
[root@localhost]#hostname test1
[root@test1]#
[root@localhost]#hostnamectl set-hostname \>test1 // 输入“\”符号来转移Enter字符,更改主机名为test1.
[root@localhost]#bash // 执行命令。
[root@test1]#
[root@localhost]#hostname test1
[root@test1]#