Skip to content

Instantly share code, notes, and snippets.

@bbtdev
Forked from debxp/wifi-cli-connection.txt
Created February 5, 2020 22:12
Show Gist options
  • Save bbtdev/fdf5dd80cb77412b4a3aa0b108700fc9 to your computer and use it in GitHub Desktop.
Save bbtdev/fdf5dd80cb77412b4a3aa0b108700fc9 to your computer and use it in GitHub Desktop.
Wifi connection from command line after a Debian minimal install
Create the file 'wpa_supplicant.conf'...
$ sudo nano /etc/wpa_supplicant.conf
Put the following in ti:
network={
ssid="your_wifi_name"
psk="your_wifi_password"
}
Save, exit 'nano' and run 'ip a' to get your wlan interface name. In my case, is 'wlp2s0'. So, you can run...
$ sudo ip link set wlp2s0 down
$ sudo ip link set wlp2s0 up
$ sudo wpa_supplicant -B -i wlp2s0 -c /etc/wpa_supplicant.conf -Dnl80211,wext
$ sudo dhclient wlp2s0
Should work... maybe... :)
After a reboot, just run:
$ sudo wpa_supplicant -B -i wlp2s0 -c /etc/wpa_supplicant.conf -Dnl80211,wext
$ sudo dhclient wlp2s0
@bbtdev
Copy link
Author

bbtdev commented Feb 5, 2020

Had trouble with "-" in the wifi name "XXXX-XXXX", connected my phone and turned on mobile hotspot and then connect to phone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment