
sudo rm  /usr/lib/firmware/iwlwifi-*


sudo cp -v iwlwifi-ty-a0-gf-a0-59.ucode /lib/firmware/



sudo reboot


iwconfig

if you see for example:


wlp2s0    IEEE 802.11  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=-2147483648 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on


sudo apt-get install wpasupplicant -y 


Note that if you are using Ubuntu desktop edition, then you need to stop Network Manager with the following command, otherwise it will cause a connection problem when using wpa_supplicant.

sudo systemctl stop NetworkManager



sudo ifconfig wlp2s0 up


sudo iwlist wlp2s0 scan | grep ESSID


wpa_passphrase "your-ESSID" "your-wifi-passphrase" | sudo tee /etc/wpa_supplicant.conf


sudo wpa_supplicant -B -c /etc/wpa_supplicant.conf -i wlp2s0


sudo dhclient wlp2s0


ip addr show wlp2s0
