在 CentOS(以及其他 Linux 发行版)里,aliases(命令别名)是可以删除/取消的,而且操作很简单。
如果你只是想在当前 shell 会话里取消某个 alias:
unalias 别名
例如:
unalias ll
执行后,当前终端里 ll 就不再是别名了。
查看当前有哪些 alias:
alias
alias 一般定义在以下文件中(常见位置):
~/.bashrc~/.bash_profile 或 ~/.profile/etc/bashrc/etc/profilevi ~/.bashrc
alias ll='ls -l'
#):# alias ll='ls -l'
source ~/.bashrc
如果你只是偶尔想用原命令,而不是删 alias:
\ll
或者:
command ll
unalias 只对当前 shell 有效如果你愿意,可以告诉我:
我可以给你更精准的操作命令。