Configure Wifi in Debain Linux(Ubunut Server) with WPA Supplicant

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.

wifi-wpa-supplicant

We need to have a LAN connectivity via ethernet on the host computer where we need to configure Wifi.

  1. STEP 1: find the name of your Wireless Interface
    • iwconfig
    • sudo ifconfig wlan0 up   (bring wifi up)
    • sudo iwlist wlan0 scan | grep ESSID
  2. 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

Leave a Reply

Your email address will not be published. Required fields are marked *