CentOS: how to fix error ping Name or service not known?
[root@tutorialspots ~]# ping google.com ping: google.com: Name or service not known
How to fix it?
Check file /etc/resolv.conf:
[root@tutorialspots ~]# cat /etc/resolv.conf # Generated by NetworkManager search nocix.net nameserver 127.0.0.1
Add theses lines:
nameserver 184.108.40.206 nameserver 220.127.116.11
Done!, now you can ping
[root@tutorialspots ~]# ping google.com PING google.com (18.104.22.168) 56(84) bytes of data. 64 bytes from dfw28s05-in-f14.1e100.net (22.214.171.124): icmp_seq=1 ttl=52 time= 40.8 ms
But every time when you restart the computer your /etc/resolv.conf will be replaced by default.
Method 2: check your /tmp directory, it is full, delete some files
Recent search terms:
- https://tutorialspots com/centos-how-to-fix-error-ping-name-or-service-not-known-4520 html
- name or service not known cenous 7
- name or service not known centos 7
- ping www google com name or service not known centos 8