Modify hostname in Linux system
Modify the host name in the Linux system 1. Use the hostname command
The hostname command can only temporarily change our hostname, which will revert to the original hostname when we restart it.
[root@server ~] # hostname server1 [root@server ~] # uname-nserver1# use the uname-n command to view the modified hostname and modify the configuration file
You can permanently modify your hostname by modifying the / etc/sysconfig/network file
[root@client1 ~] # vim / etc/sysconfig/networkNETWORKING=yesHOSTNAME=client#client is the modified hostname