-
Look for the connection name, for example Wired connection 1
nmcli connection show
-
configure
sudo nmcli connection modify "Wired connection 1" \ ipv4.addresses 192.168.1.50/24 \ ipv4.gateway 192.168.1.1 \ ipv4.dns "8.8.8.8 1.1.1.1" \ ipv4.method manual
connection up
sudo nmcli connection up "Wired connection 1"
-
check result
ip addr ip route cat /etc/resolv.conf