In order for the Network Manager to use the example.com zone for searching, you need to do the following
sudo apt-get install resolvconf
Add search example.com to /etc/resolvconf/resolv.conf.d/base
Bypass network connections
And now a few words, what this recipe is for.
Domain search is a network configuration directive that indicates a possible suffix for DNS addresses, if you could not find the address in the form in which it was specified. On linux systems, the search directive in the /etc/resolv.conf file is responsible for this.
I was very used to using different Network Manager buns, but I was annoyed that it was not possible to specify my own domain search and at the same time not abandon all the DHCP lotions that I also actively use.
')
The directive is very convenient for system administrators and developers. Suppose a company has a lot of cars. All machines are in the common zone example.com. In order to access the machine by name, you have to write something like ssh oval.example.com each time. As a result, we have to mention example.com dozens of times a day and this starts to get in the way. If you add the line search example.com to the /etc/resolv.conf file, all of these lines can be abbreviated to ssh oval.
I use Ubuntu on my desktop machine, because manual editing of /etc/resolv.conf does not produce positive results, because the Network Manager regularly writes its configuration to it there. So you need to teach the Network Manager to work with the zone I need. The recipe is given at the very beginning.