Home > Article > Operation and Maintenance > What should I do if Linux cannot ping the host name?
Problem restoration:
The Linux server cannot ping its own host name, as shown below:
Solution Method:
1. Modify the /etc/sysconfig/network configuration file
#vi /etc/sysconfig/network NETWORKING=yes HOSTNAME=ZWCLC6X-9232//在这修改hostname
2. Modify the /etc/hosts configuration file
# vi /etc/hosts 127.0.0.1 localhost.localdomain localhost 119.10.8.125 ZWCLC6X-9232 //在这修改hostname和你的IP对应关系
3. Restart the network service
# service network restart
Recommended tutorial: linux tutorial
The above is the detailed content of What should I do if Linux cannot ping the host name?. For more information, please follow other related articles on the PHP Chinese website!