command line aliases to make repeated processes quicker. I’ve used them in the past and on specific programs but never on command line utilities.
like for instance with Debian, I’m repeatedly typing sudo apt-get install, so I aliased it: alias sagi=“sudo apt-get install” and it works pretty good.
Are there any best practices or aliases to avoid when using them? Other than known commands obviously. Are there popular alias lists out there?
I’ve got a ton, most are already listed or along the same vein.
The two suggestions I have are not actual aliases but worth remembering:
- Ctrl + Alt + E - turn your alias into its original command
- \ - Place before your alias to run the original command’s meaning. Useful if you overwrite a default command (overwriting default commands is not recommended though… often the alias will ignore any options passed through and so let’s say you overwrite
rm
with another app that deletes files, then you forget that, and then try to delete some files usingrm
-i to get a prompt for each removed file. Often the alias will just operate as normal w/o a prompt saying that it ignored-i
completely)