//For turnning on wifi
#sudo nmcli radio wifi on
//For showing a List of available networks
#sudo nmcli dev wifi list
//For connecting to specific network.
#sudo nmcli dev wifi connect network-ssid //newtork-ssid==name of network
sudo nmcli d wifi list
sudo nmcli d wifi connect wifiSSID password thePASSWORD