Alright, here is some command/key-combo’s to make your life easier in Linux that I have found useful and helpful over the past years…
Reverse search in bash.
Have you forgotten that huge command and all the switches that goes with it that you just used about an hour ago. No worries.
Press <ctrl> + <r> and bash will change to <Reverse-i-search>. Simply start typing a word in the command and it will start appearing. Press the key combination again to view more results for the same word you are searching on. Continue until you have your command.
This is very helpful if you use the command line a lot. You can make it easier, safe time, and work faster than ever with this. Eg. In Ubuntu, one uses ‘sudo apt-get install’ quite often and takes some time to type out. With alias, you can make that command one word long. Like this:
alias Install=’sudo apt-get install’
That is it, now try it out. When you type in ‘Install’ (note that capital I) it will run ‘sudo apt-get install’
You are probably thinking I know this, just use find. No, try something else. This is a super fast way of searching for documents. A big problem one encounter when using the normal search tool is permissions. Always forget about the permissions. You get 100 results returning “Permissions Denied”
So, Here it is.
locate , Try it out. type in locate, followed by a filename or keyword of a filename that you know. INSTANT
Multiple Commands in one line
Sometimes you need to run multiple commands in one line. And don’t want to wait for each on to finish.
Eg. sudo apt-get update
sudo apt-get install vim-nox
Here is how to do it. Simply put an “&&” between the commands.