Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have no idea how things like systemD work with resolv.conf.
The intent of those who designed Unix networking was to have a simple text file that was easy to parse and contained the information needed.
I have always stuck to this and create my own resolv.conf and then made it immutable so nothing can change it, and things just work.
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
It must be a DNS thing. If you can ping a numeric IP only DNS can be failing.
Setting nameserver 8.8.8.8 in /etc/resolv.conf is sensible. But take into account that this file is overwritten every time a new DHCP address is issued. Very important.
Try to issue
Code:
dig www.google.com
and see which DNS server is being used. If any. If you don't have dig, try nslookup.
If no DNS server is used, stop the dhcp client (not sure how to do that on Centos) or use a fixed IP. Set resolv.conf to nameserver 8.8.8.8 and try again.
I cannot run dig, it is not installed. And since no name resolution i cannot run yum either
Quote:
Originally Posted by jlinkels
It must be a DNS thing. If you can ping a numeric IP only DNS can be failing.
Setting nameserver 8.8.8.8 in /etc/resolv.conf is sensible. But take into account that this file is overwritten every time a new DHCP address is issued. Very important.
Try to issue
Code:
dig www.google.com
and see which DNS server is being used. If any. If you don't have dig, try nslookup.
If no DNS server is used, stop the dhcp client (not sure how to do that on Centos) or use a fixed IP. Set resolv.conf to nameserver 8.8.8.8 and try again.
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
Try
Code:
$ ls -al /etc/resolv.conf
lrwxrwxrwx 1 root root 35 Mar 3 19:34 /etc/resolv.conf -> /var/run/NetworkManager/resolv.conf
On my machine network-manager is managing resolved. So, I opted to handle my connections through network-manager. Yours might be different. If it says /etc/resolv.conf is a link to
Quote:
/var/run/systemd-resolved/stub-resolve.conf
, see if the service is running:
Code:
& systemctl status systemd-resolved
If it it's not enabled, enable it and then start it. Whatever the case, make sure /etc/resolv.conf links to the correct file, and that your connections are managed correctly.
OP check your router and ensure that it is configured properly to give out the correct DNS Servers. No need to have systemd-resolved or anything else running if you are not providing DNS Services.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.