Linux command
alias 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
List
alias
Create
alias [ll]='ls -la'
Example
alias [grep]='grep --color=auto'
Remove
unalias [ll]
Example
echo "alias ll='ls -la'" >> ~/.bashrc
说明
alias is a shell builtin that creates shorthand names for commands or command sequences. When you type an alias name, the shell substitutes the associated value before execution. Aliases are useful for creating shortcuts for frequently used commands with specific options, reducing typing and preventing repetitive mistakes.
FAQ
What is the alias command used for?
alias is a shell builtin that creates shorthand names for commands or command sequences. When you type an alias name, the shell substitutes the associated value before execution. Aliases are useful for creating shortcuts for frequently used commands with specific options, reducing typing and preventing repetitive mistakes.
How do I run a basic alias example?
Run `alias` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
Where can I find more alias examples?
This page includes 5 examples for alias, plus related commands for nearby Linux tasks.