Avatar of toben88
toben88 asked on

Change DNS servers for Linux without a reboot

I have a Centos 5 Linux server (clone of RedHat) that has incorrect DNS settings. I can ping IP addresses but not any domain names from this server. I need to set the new DNS servers without rebooting the server as it is in the middle of a batch job that will take several hours.

I believe DNS servers should be set in/etc/resolv.conf and that file is empty.
My DNS servers are 64.207.238.250 and 64.207.238.251

How do I set the correct DNS servers and get them working without a reboot? I can not reboot as the server is doing some batch processing that will take several hours.

Thank you
LinuxLinux Distributions

Avatar of undefined
Last Comment
http:// thevpn.guru

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
http:// thevpn.guru

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
omarfarid

Changing the IPs of DNS servers used to resolve domains does not require reboot.

Rich Olu

You may need to restart the network service.
http:// thevpn.guru

Changing the DNS has an immediate effect.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck