DEV Community

Ajeeb.K.P
Ajeeb.K.P

Posted on

How to connect to wifi

Export your password

export WIFI_PASSWORD=<your-password>

If you don't want to see your password in bash history, just add a space before above command. This is not specific to this command, for any command in bash shell.

How to see existing wifi list

sudo nmcli dev wifi

Connect to your WiFi

sudo nmcli dev wifi connect "<your-wifi-name-or-ssid>" password "$WIFI_PASSWORD"

Top comments (0)