April 25, 2019
By default nmcli (NewtworkManager cli) will try to obtain the ip with DHCP, and that’s fine, but if you want to set a static ip here’s how:
ip addr show <dev> for ip/subnet.
ip route to know the gateway.
This is all the information that will be needed for configuring your static network connection.
In contrast to traditional deb-sys network configuration
(which is stored in
NetworkManager connection conf can be found in
There are many Gui tools that you can use to interact with configuration, but in the end it’s these file that contain the information so we’ll just edit these.
nmcli dev you can see which device is connected, and the last column indicates the name of the file which stores the config
In the file you have identified in the previous step find the
change method from
add an entry with ip, subnet, gateway (info from step 1):
(mine looks like this
And now if you restart network manager you should be connecting through your statically assigned ip.
If you compare the output of
ip addr show <dev> from the one you had in step1, you should notice the absence of the flag
dynamic in the ipv4 section.
Francesco Calo developing on linux in La Spezia.
Just a programming journey.