Skip to main content

Ubuntu DNS 设置

· One min read

Ref How do I change my DNS on the terminal?

First find your connection name you want to change and note the name of it:

nmcli connection

Then use nmcli to change the DNS settings:

nmcli connection modify <interface name> ipv4.dns "<DNS Server>,<DNS Server>"

Check your interface to ensure that it has been updated correctly:

nmcli connection show <interface name>