On Ubuntu 14.04, how can I add an Ethernet connection from the command line that's editable in the Network Manager GUI?

I have studied nmcli which is the command line tool for the Network Manager. Unfortunately:

  • If you compare the nmcli tool on Ubuntu 14.04 LTS and that on Ubuntu 15.10 documentation, you'll notice that 14.04 LTS doesn't support adding an Ethernet connection via the nmcli tool. The add command is added to nmcli's connection object since 15.10. It's not available on 14.04.

  • The nmcli on Ubuntu 14.04 LTS can connect to a wireless network (see the last example in its document), but I want to create an Ethernet connection.

  • Although I can edit the file /etc/network/interfaces to add the Ehternet interfaces, they are not visible in the Network Manager, and this is not what I prefer.

I'm doing this because I'm writing a shell script to configure the network, and I also want to allow the users to edit the configuration from the GUI when necessary.

Thanks in advance!



I forgot to mention nm-connection-editor: As far as I can see, it is still a GUI tool and requires the user interaction to create/edit a connection. Because I'm trying to automate the process in a script, I don't want to use any GUI stuff here.

1 Answer 1


You can edit/create a connection file in /etc/NetworkManager/system-connections. For instance I just created ethfix192





You will see how the lines in this file correspond to the settings in the GUI.

Note: Ensure that the file has permission '600', otherwise NetworkManager will ignore the file.

Afterwards you need to restart NetworkManager (IIRC on 14.04 it was with sudo service NetworkManager restart, or sudo service network-manager restart) and NetworkManager will recognize the connection.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .