Remove aliases set by alias
unalias [-a] name [name ...]
-a: Delete all defined aliases.
name: Specifies one or more defined aliases to be deleted.
unalias returns true unless the alias you want to remove is undefined.
# Delete all defined aliases
unalias -a
# Delete defined aliases (assuming the following aliases exist in the current environment)
unaliasvi
unalias ls grep
Please note when executing the script:
If a bash script executed using the source command executes the alias or unalias command, it may have an impact on the alias settings of the terminal environment; the alias settings of the terminal environment may also change the running results;
Bash scripts called through sh or scripts directly run by the current user with execution permissions are not affected by the alias of the terminal environment.
To view and set aliases, please view the alias command.
This command is a built-in bash command. For related help information, please see the help command.
优先推荐相关内容,同时保留你的阅读轨迹和收藏入口。