alias
alias linux command cheatsheet by Thamizhiniyan C S
Introduction
The alias command allows the user to create replacements for other commands and make them easier to remember and use.
Syntax
alias [option] [alias]='[command-or-path]'
Important Flags
Flag
Description
-p
Print the list of currently defined aliases.
-a
Define alias for all users (must be superuser).
Examples
Command
Description
aliasTo list all available aliases on the system
alias -pTo list all available aliases on the system (Same as the above command)
alias print="echo"Creating an alias named `print` which executes the `echo` command
alias list='ls -la'Creating an alias named `list` which executes the `ls -la` command
unalias [alias]To remove an alias
unalias -aTo remove all alias
Last updated
Was this helpful?