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'sconnection
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!
==========
UPDATE #1:
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.