Frequently Asked Question
To update the IP Address of an interface using NetworkManager, first identify the interface with
sudo nmcli device status
Then update your device, in our example it's ens18 as below exchanging your own IP addresses and DNS servers of course.
sudo mcli con mod ens18 ipv4.address 10.1.1.198/24
sudo nmcli con mod ens18 ipv4.gateway 1 10.1.1.2
sudo mcli con mod ens18 ipv4.dns "10.1.1.5 10.1.1.4"
sudo nmcli con mod ens18 ipv4.method manual
sudo mcli con up ens18
Will return something like
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveComnection/3)
And the new IP Address will be in effect. You can check the status of the interface using
sudo nmcli device show ens18