resolv.conf - how to reload?
I have slackware machines setup with static ips and I had to change the resolv.conf file.
Does the machine have to be rebooted? What command can I run to reload the resolv.conf file without rebooting? thx |
coldbeer --
In my experience, editing resolv.conf has always seemed to be 'good enough' ... YMMV ... ( and I am not sure what applications may be caching DNS ) -- kjh This is my resolv.conf: Code:
# cat /etc/resolv.conf Code:
; <<>> DiG 9.10.5-P3 <<>> any google.com Code:
# cat /etc/resolv.conf Code:
# dig any google.com |
Looks like resolv.conf changes are effective immediately.
Using the 'dig' command the dns host used is shown at the bottom: ;; Query time: 81 msec ;; SERVER: 144.111.55.235#53(144.111.55.235) ;; WHEN: Tue Jan 09 10:21:30 EST 2018 After I change the resolv.conf and run dig again: ;; Query time: 0 msec ;; SERVER: 144.111.44.79#53(144.111.44.79) ;; WHEN: Tue Jan 09 10:22:11 EST 2018 ;; MSG SIZE rcvd: 268 |
Quote:
|
Changes to resolv.conf do eventually come into effect, but can take a couple of minutes to "stick," IME. I wonder if there's a way of "forcing" the issue.
By the way, NetworkManager, if you are using it, will overwrite changes to resolv.conf. |
Quote:
Code:
chattr -V +i /etc/resolv.conf |
Quote:
|
All times are GMT -5. The time now is 01:43 AM. |