Ubuntu Server "Search Domains"
-
This always confuses me when setting up Ubuntu Server. What is "SEARCH DOMAINS". I would think it would be easy to find an answer online, but I am coming up blank.
-
@CCWTech If you try to resolve a name that isn't a FQDN, your resolver will try to resolve that name + the search domain.
If you set that to
foo.com
, and you try to runping bar
, to resolve whatbar
is (unless you have it defined in/etc/hosts
), your resolve will try to resolvebar.foo.com
for the ping.After your install, if you look at
/etc/resolv.conf
you should see the search domains value in there. -
@CCWTech they serve little purpose in the modern world. It's just the network domains that are automatically tried when you put in a URL with only the hostname and leave off the network name. Which no one does, so it's unused. It's not a LInux thing, it's a general networking thing so the same on desktops, Windows, wherever. Just a standard part of DNS, but like many DNS functions, one that is mostly a vestige.
-
If you use Active Directory on Windows, it fills it at least one search domain automatically. Windows is about the only place to see search domains still used frequently. This is primarily used for when Linux is put onto legacy style Windows based LAN networks.