#!/linuxSucks/Setup wifi with wpa_supplicant
Jul 30, 2019Open the wpa-supplicant configuration with your text editor of choice:
sudo vim /etc/wpa_supplicant/wpa_supplicant.conf
Go to the bottom of the file and add the following:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
network={
ssid="WIFI_NAME"
psk="WIFI_PASS"
key_mgmt=WPA-PSK
}
It is possible to set up multiple configurations for wireless networking. For example, you could set up one for home and one for school.
network={
ssid="SchoolNetworkSSID"
psk="passwordSchool"
id_str="school" }
network={
ssid="HomeNetworkSSID"
psk="passwordHome"
id_str="home"
}
If are two o more networks in range, you can add the priority option to choose between them. The network in range, with the highest priority, will be the one that is connected.
network={
ssid="HomeOneSSID"
psk="passwordOne"
priority=1
id_str="homeOne"
}
network={
ssid="HomeTwoSSID"
psk="passwordTwo"
priority=2
id_str="homeTwo"
}