Problem:
ping: www.baidu.com: Name or service not known
Analysis:
There is a problem with domain name resolution.
(Recommended tutorial: centos tutorial)
Solution:
1. Open the /etc/resolv.conf file
2. Add nameserver, as follows:
> nameserver 192.168.37.2
The IP following is the DNS address configured in ifcfg-ens33 before.
Recommended related video tutorials: linux video tutorial
The above is the detailed content of What should I do if I can ping the domain name successfully under CentOS but cannot ping it?. For more information, please follow other related articles on the PHP Chinese website!