Linux中别名的查询: alias

linux中别名的设置添加:

1.临时性的,切换用户或者重启会失效

2.永久有效模式:编辑 ~/.bashrc 1)vim ~/.bashrc 2)添加:alias grep='grep --color=auto' ,保存退出 3)soucre ~/.bashrc 或者 在~/.bash_profile文件最后添加soucre ~/.bashrc

别名的删除

1.临时生效:unalias + 要删的别名

  1. 永久生效 编辑 ~/.bashrc,把不用的别名删除保存,然后在soucre ~/.bashrc