Linux Command Line Tips and Tricks
Jake G January 22, 2020 #Linux #CommandlineAliases can be used to speed up your command line usage. They can be used to issue multiple commands with a single alias command.
The alias "update" is used to issue 3 commands apt-get update, apt-get dist-upgrade, and apt-get autoremove.
The alias "h()" is a function alias, this allows you to quickly search your history for keywords. such as "h nano" or "h grep" to get a list of lines from your bash history that match those keywords. We also ignore duplicates and lines beginning with a space and increase the history size.
The final alias is used for autocompletion of a line based on your bash history. You may already know that you can press the up key to go through previously exectuted commands, however with this alias you can type a partial command such as "sudo nano" and then press up, and it will scroll through only the lines in your history that started with "sudo nano". If you type to a point that you dont like the results, just press ctrl+c to get back to a clean prompt and start over.
&&
&& &&
&& && &&