Since Ubuntu 18.04 , network GUI to setup network doesn't include any more the search domain field.
How can we set it again in a manner that resist to reboot?
Since Ubuntu 18.04 , network GUI to setup network doesn't include any more the search domain field.
How can we set it again in a manner that resist to reboot?
Per my other answer focusing on 16.04 GNOME (which 18.04 basically has inherited), you can fix this by using the old-style Network Editor by running
nm-connection-editor
, which is the older Network Manager editing GUI we all love.Basically, however, for 16.04 and onwards, the GNOME team for Ubuntu made some decisions about the older network editing menu, providing a trimmed down one for the average end user. Per Jeremy Bicha, from the #ubuntu-gnome IRC channel back in April:
The idea was basically that the 'most common options' that people would have to edit would be in the 'easier' settings GUI. But for more advanced users, they can still call
nm-connection-editor
to edit things like Search domains and such.Note that the answer for 16.04 applies for 18.04. You can still use the other answer I wrote as a basis for solving this in 18.04.
(Note that you will need to disconnect and reconnect the network connection to get the search domain updates to apply, by the way. You do not need to restart all of the Network Manager services just to make this apply, just disconnect and reconnect your cable, and the updated profile configuration will apply)
Ubuntu 18.04 uses Netplan for networking.
(the latter shows your search domains home.com and lab.com)
It's possible to set it through CLI with :
We can check it by looking at
/etc/resolv.conf
and trying to resolve a hostname without the domain like so :Which will resolve the IP to
www.example.com
But don't do as I did, and mistake it for an "additive" setup:
In an attempt to overwrite the "search" line in /etc/resolv.conf and expect that this is the only thing that will change. The above seems to remove alle the original settings from ens224 including whatever makes it work. So after the apply, the server was no longer reachable.
Yes, my own fault for not reading the manual. You have now been warned.