Skip to content

Instantly share code, notes, and snippets.

@dasegn
Last active January 26, 2016 21:34
Show Gist options
  • Save dasegn/9cd7ad0934e5f91c4d2e to your computer and use it in GitHub Desktop.
Save dasegn/9cd7ad0934e5f91c4d2e to your computer and use it in GitHub Desktop.
Ubuntu 14.04 - Connect to wireless network in terminal
nmcli is a command‐line tool for controlling NetworkManager.
Disconnect:
nmcli d disconnect iface wlan0
Connect:
nmcli d wifi connect <WiFiSSID> password <WiFiPassword> iface wlan0
Just change wlan0, <WiFiSSID>, <WiFiPassword> to reflect your setup.
If WiFi info already saved, easier way:
Disconnect:
nmcli c down id <WiFiConn>
Connect:
nmcli c up id <WiFiConn>
<WiFiConn> name of connection as it was save in NetworkManager (Check nmcli c).
Myself prefer nmcli d disconnect iface wlan0 & nmcli c up id <WiFiConn> which have minimum input from myside.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment