linux modify hostname
Modify hostname,
first step:
vim /etc/sysconfig/network
HOSTNAME=node1
Step 2:
#hostname node1 或者 sysctl kernel.hostname=node1
third step:
vim /etc/hosts
192.168.7.133 node1
Note that the current session will not change, but subsequent new sessions will take effect.
Turn: In-depth understanding of Linux to modify hostname
0 Comments