Modify hostname under CentOS 7
View the current hostname Method 1 Method 2: centos7 and above Temporary host name change Temporary changes that do not take effect after restarting the server. Check the IP address corresponding to this machine name. Permanent host name change Method…