Create aliases or shortcuts to type long commands faster.
- Create an alias.
alias ll='ls -l'
- This alias will be available only for the current session.
- To make alias available since user log in, you need to edit
~/.bashrcfile (for Bash) and add the
aliascommand. Then, you can run
source ~/.bashrcif you don’t want to wait until next log in to enable the alias.
- To run a command instead of an alias with the same name, prepend
\. For example, I have this alias:
alias ls='ls -l'but I want to run
lscommand, not the alias: I execute
If you have any suggestion, feel free to contact me via social media or email.
Latest tutorials and articles: