Configuring wifi is a pretty easy task when we have a Desktop Environment installed on our Linux system. But it becomes a troublesome process when we have to configure Wifi in headless mode. Here are some tools and commands to configure your wifi efficiently in any Debian Linux OS.
We need to have a LAN connectivity via ethernet on the host computer where we need to configure Wifi.
- STEP 1: find the name of your Wireless Interface
- sudo ifconfig wlan0 up (bring wifi up)
- sudo iwlist wlan0 scan | grep ESSID
- STEP 2: Connect to Wi-Fi Network With WPA_Supplicant
- sudo apt install wpasupplicant
- wpa_passphrase your-ESSID your-wifi-passphrase | sudo tee /etc/wpa_supplicant.conf
- sudo wpa_supplicant -B -c /etc/wpa_supplicant.conf -i wlan0
- sudo dhclient wlan0 (obtain IP address)
- sudo dhclient wlan0 -r (release IP address)
For more info like starting this service at boot time and obtain a status IP address head on to this Awesome Article