Home >Operation and Maintenance >Linux Operation and Maintenance >Example tutorial on modifying hostname in Centos system
1. Use the command to temporarily modify
hostname oier
In this way, the hostname of the server will become oier, but it will change back after restarting
2. Edit the configuration The file is permanently modified
vi /etc/sysconfig/network
HOSTNAME=oier
It will not take effect until restarting
== =============================
Host analysis modification
Since the Host file will parse the Hostname to the local by default, if you need to do this, you need to modify the Host file at the same time
vi /etc/hosts
The above is the detailed content of Example tutorial on modifying hostname in Centos system. For more information, please follow other related articles on the PHP Chinese website!