Home > Operation and Maintenance > Linux Operation and Maintenance > What should I do if Linux cannot ping the host name?

What should I do if Linux cannot ping the host name?

王林
Release: 2020-05-15 13:35:49
Original
5234 people have browsed it

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:

What should I do if Linux cannot ping the host name?

Solution Method:

1. Modify the /etc/sysconfig/network configuration file

1

2

3

#vi /etc/sysconfig/network

NETWORKING=yes

HOSTNAME=ZWCLC6X-9232//在这修改hostname

Copy after login

2. Modify the /etc/hosts configuration file

1

2

3

# vi /etc/hosts

127.0.0.1 localhost.localdomain localhost

119.10.8.125  ZWCLC6X-9232 //在这修改hostname和你的IP对应关系

Copy after login

3. Restart the network service

1

# service network restart

Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template