Change the DNS on Ubuntu

Step-by-step guide to turning off automatic DNS in GNOME Settings on Ubuntu, with nmcli as an alternative and fixes for common resolver errors.

Short answer: The DNS fields live in Settings > Network > the gear icon next to your connection > IPv4 (and IPv6) > DNS; switch Automatic off and enter the addresses. Register your IP with your Smart DNS provider first. On Ubuntu the resolver runs through systemd-resolved, so edit the connection, not /etc/resolv.conf.

Which model do I have?

Ubuntu has no model numbers to decode; what matters is which network tooling your install uses. The default Ubuntu Desktop ships GNOME Settings with the Network panel [1], and the same panel documents the DNS switch in both the GNOME and Ubuntu official help [1][2]. The older NetworkManager dialog (nm-connection-editor) is still installed and is what Smart DNS guides used for years [3]. Ubuntu desktop runs systemd-resolved as the resolver, which manages /etc/resolv.conf as a symlink to its own stub file [4].

Model examplePatternOS versionGuideSrc
Settings > Network with a gear next to the active connection default GNOME Settings GUI flow Ubuntu Desktop (GNOME, 22.04 and later) How to change DNS on Ubuntu (22.04 and later) [1]
nm-connection-editor (Edit Connections window) older NetworkManager dialog, still installed by default Ubuntu with NetworkManager How to change DNS on Ubuntu (22.04 and later) [3]
/etc/resolv.conf is a symlink to .../run/systemd/resolve/stub-resolv.conf systemd-resolved manages resolution; edit per-connection, never the file Ubuntu Desktop with systemd-resolved How to change DNS on Ubuntu (22.04 and later) [4]
  1. GNOME Help - Manually set network settings - accessed 2026-11-23
  2. Unlocator Support - How to Set Up DNS on Ubuntu - accessed 2026-11-23
  3. freedesktop.org - systemd-resolved service documentation - accessed 2026-11-23

Guides for this brand

Fix network errors on this brand

On Ubuntu the resolver errors come from glibc: "Temporary failure in name resolution" (a lookup that got no answer) and "Name or service not known" (an authoritative negative answer). Command-line tools add their own wrapper, most visibly curl's "Could not resolve host". The three pages below map each to the checks that fix it.

Sources

  1. GNOME Help - Manually set network settings - accessed 2026-11-23
  2. Ubuntu Help - Manually set network settings (via Wayback snapshot; live URL returned 503 to scripted fetchers) - accessed 2026-11-23
  3. Unlocator Support - How to Set Up DNS on Ubuntu - accessed 2026-11-23
  4. freedesktop.org - systemd-resolved service documentation - accessed 2026-11-23