Enabling Wifi from lubuntu terminal

My eeepc keyboard is dead, so the “Fn + F2” combination to enable and disable wifi doesn’t work. I’ve mistakenly disabled wifi from networking menu and lost the option to enable it back. After lots of searching, this is what worked for me.