sudo apt update
sudo apt install wpa_supplicant
iw dev
ip link show <interface-name>
sudo ip link set wlan0 up
iw <interface-name> link
sudo wpa_passphrase <ESSID> >> /etc/wpa_supplicant.conf
after hit enter, the prompt will wait you to insert the network password. Just enter it and hit enter
sudo ps aux | grep wpa_supplicant
kill <PID>
sudo wpa_supplicant -B -D nl80211 -i <interface-name> -c /etc/wpa_supplicant.conf
iw <interface-name> link
sudo dhclient <interface-name>