Putting a network interface up/down from command line
I think that ifconfig
is not handling wireless stuff like ESSID, channel and key. Take a look to iwconfig
instead.
http://manpages.ubuntu.com/manpages/vivid/en/man8/iwconfig.8.html
-EDIT-
You can also use "NetworkManager command line" nmcli
: https://askubuntu.com/questions/461825/connect-to-wifi-from-command-line