alias command is mainly used to define a new command (a shortcut name) for a single big command. It helps us to avoid repetitive long typing of commands.
- The shortcut name can be used as a substitute for a single big command because shortcut name will have same functionality as if we write the big command.
- It helps us to save a lot of time when we have to write big command frequently.
- An alias doesn’t replace itself.
Syntax for alias command
- There must be no spaces before or after the equals sign in the alias command.
alias [option] Name='value'
To display all defined alias use the command
alias -p. We can also use
alias to display all defined alias.
Types of alias in Linux
We can create two types of alias in Linux
- Temporary alias
- Permanent alias
Creating Temporary alias
Creating Permanent alias
unalias the alias command
remove any specific alias
To delete any specific alias use command
unalias alias_name Don’t forget to replace alias_name with your alias name
remove all aliases
To delete all aliases use the command
Linux command with examples
date | dd | df | diff | dir | dmidecode | du
echo | eject | env | exit | expr
grep | groups | gunzip | gzip
kill | kmod
man | mdsum | mkdir | more| mv
passwd | pidof | ping | pr | ps | pwd | pstree
rdiff-backup | reboot | rename | rm | rmdir
tac | tail | talk | tar | tee | time | tree | top | touch | tr
unalias | uname | uniq | unzip | uptime | users
vim | vi
yes | youtube-dl
zcmp | zdiff | zip | zz