Ubuntu Desktop Networking

Old-school

We use same old-school Debian network setup as on Ubuntu Server but eventually switch to DHCP

vi /etc/network/interfaces

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

and disable SSH in case you needed it for post-installalationthis will not cut your connection eventhough you might be doing this remotely

systemctl status ssh
systemctl stop ssh
systemctl disable ssh

Domain search

Four solutions depending on your version and choices

  1. use the gui
  2. dhclient
  3. resolvconf
  4. systemd-resolved

use the gui

Control Center -> Network --> (general tab) Domain name: ...
Control Center -> Network --> (DNs tab) Search domains: ...

dhclient

add some domain searches for DHCP sessions, e.g.

cd /etc/dhcp/
cp -pi dhclient.conf dhclient.conf.dist
vi dhclient.conf

prepend domain-search "example.com", "example.local";

resolvconf

change the resolvconf config directly

    cd /etc/resolvconf/resolv.conf.d
    cp -pi base base.dist
    vi base

    search example.com

also make sure that the local system hostnames resolves itselfs as FQDN accordingly (it can point to 127.0.0.1 on a desktop)

systemd-resolved

In case you wanna keep the wrapper against dynamic name resolution AND search against your domain

vi /etc/systemd/resolved.conf

Domains=DOMAIN.TLD

GUIDES | LECTURES | BENCHMARKS | SMTP HEALTH