Unlike many threads, I see my on both 14.04 and 16.04 the NIC configs are stored in /etc/NetworkManager/system-connections
, which is still discussed on some threads but not many AFAI have seen. And I haven't found any tool-provided command. E.g. in this thread someone gives a hint to update the ip address defined in an existing NIC config file (using find
, sed
etc.), but that's still a hack and there's no guarantee it'll still work once anything on the network manager or else on operating system changes.
Question: is there anyway to create / update files under /etc/NetworkManager/system-connections
from command line?
I'm on Ubuntu 14.04 but info on newer distros is also appreciated.
Use nmcli.
Show the available connections:
Show the current settings for connection with UUID
9fe88459-efaf-45bd-8958-ca1e202d04fd
:Set the IPv4 address for this connection:
Its quite simple goto terminal and type in:-
This will let you drop your IP and get new from DHCP. What this is a Dynamic host configuration protocol client. The internet systems consortium DHCP Client, dhclient, provides a means for configuring one or more network interfaces using Dynamic Host Configuration Protocol, BOOTP protocol, or if these protocols fail, by statically assigning an address.