Make searching history in terminal easier


This might not be a problem but a feature . But I want to mention this here.
Some times while using the terminal you might know a command which is very big and you've already used it before. That means it's in the terminal history and you want to use it.

It is really irritating to hold the up arrow (↑) until you find it. So, here's an useful feature that allows you to search the history just by typing the first few letters of your command in the terminal.

Let me illustrate what we want to achieve using an example. 

sudo -s
man sudo

If I want to use sudo -s I have to press ↑ three times. Instead of that I can use it by typing S and pressing ↑.

Let's see how to do it.


Open a terminal and type the following:

gedit ~/.inputrc
## arrow up
## arrow down
Now we can search easily in the terminal.


Popular posts from this blog

How to setup a wifi-hotspot in Ubuntu: The terminal way.


How do I resolve unmet package dependencies?