Skip to content

nmcli, networkmanager

NetworkManager - network management daemon

restart NetworkManager

it's NetworkManager, not networkmanager :)

systemctl restart NetworkManager.service

get general network overview

nmcli

get list of network devices and status

nmcli device status

get information about networkmanager connections

nmcli con

change dns resolver with NetworkManager

instead of editing /etc/resolv.conf, do the following (with nmcli con you get the connection name.):

nmcli con mod "Wired connection 1" ipv4.dns "127.0.0.1"
nmcli con mod "Wired connection 1" ipv6.dns "::1"

disable DHCP provided dns

if you execute the above, you'll still have the DNS servers provided by the DHCP server available as well, do disable this behavior:

nmcli con mod "Wired connection 1" ipv4.ignore-auto-dns yes
nmcli con mod "Wired connection 1" ipv6.ignore-auto-dns yes