1. Enter the directory of the IP configuration file
cd /etc/sysconfig/network-scripts/
Enter the configuration file vi ifcfg-ens33
corresponding to the network card name(Recommended tutorial: centos tutorial)
Modify the following picture:
2. Restart the network card
Command:
service network restart
The above is the detailed content of What to do if the host cannot be pinged under centos. For more information, please follow other related articles on the PHP Chinese website!