Skip to main content

Command Palette

Search for a command to run...

Change Nameserver using NetworkManager

Published
1 min read
Change Nameserver using NetworkManager

Do not edit /etc/resolv.conf. It will likely be replaced by NetworkManager. Open a shell and add nameserver for existing connection.

nmcli con mod $ssid ipv4.dns "1.1.1.1 1.0.0.1"

The SSID can be found with nmcli con.

Replace the IP addresses to your desired ones.

Now restart the connection to apply the changes.

nmcli con down $ssid
nmcli con up $ssid

Verify with cat /etc/resolv.conf.

More from this blog

Aditya's blog

57 posts

Who tricked sands into thinking?