Network Manager from the command line

Awesome – as of at least Ubuntu Natty, the nmcli tool, which is the under-development command line utility to interact with network manager, is able to bring up and down connections, including VPN connections!

Right now, as both nvidia and nouveau are failing on my laptop, I’m using wmii. I have a VPN connection that uses a passworded file, which I previously, under gnome, defined using the network manager applet. But now I don’t have a gnome panel.

So what I do is:

Terminal 1: run nm-applet (this is necessary in order for nmcli to be able to see inactive VPN connections)

Terminal 2: I do

nmcli con

to show the connections, and pick out the uuid for the VPN connection that I want to bring up. Then I do

nmcli con up uuid

And voila, a moment later I get the notify-osd message saying my connection is up.

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s