Fixing ubuntu desktop’s wifi disconnect issue on wake

For about more than half the time, when I wake my ubuntu laptop from sleep, I will lose wifi. When I say lose, I mean I lose the wlan0 interface completely.

Now this is a problem because I quite like having wifi and normally there seems to be no way to turn it back on from that little wifi menu from the top right corner.

After doing some googling, I found a crude yet simple solution. Restart the network-manager service by running the following:

Right before writing this article, I had to run that command and now it all works buttery smooth. Maybe there is a more permanent fix, I will keep an eye out for it and when I can find some time, will dig in to some logs somewhere to actually find the issue but for now, this is satisfactory (meh) to my current needs.

Finding text within files on Linux

So at some point in your professional life, you have probably faced the following problem:

I have a bunch of files and I want to quickly find a file that contains a particular text. I don’t want to go through each file individually because that’s lame. Also, I don’t want to use GUI because I aspire to become pro at using Linux commands.

Yeah, yeah we’ve all been there. As a beginner, I struggled a lot with this and even if I found a solution, I won’t be able to recall it the next time when I’d so desperately need it. Well, here it is! Continue reading

Changing keyboard layout in Ubuntu Server (Linux, How to)

So I recently installed Ubuntu Server in a virtual machine and I had problems with my keyboard layout. I use UK layout while the default that comes with Ubuntu Server is US layout. As you can imagine, this caused problems and I had to go hunt for a solution. Finally, I found one and here it is:

You need to reconfigure keyboard configuration. Type the following:
sudo dpkg-reconfigure keyboard-configuration
Continue reading