Linux changing DNS search order

Linux Aug 15, 2018

Under Linux you need to use /etc/nsswitch.conf file which is used by system databases and Name Service Switch configuration file

edit /etc/nsswitch.conf

Open /etc/nsswitch.conf file using text editor:

vi /etc/nsswitch.conf

Look for hosts:

hosts:          files dns wins mdns4_minimal [NOTFOUND=return]

Set above order as per your requirement. Close and save the file.

Tags

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.