When wifi has a soft block due to some faulty software or kernal it can be enabled using rfkill

 rfkill list 
  • To list and then unblock the wifi using the following command.
sudo rfkill unblock wifi