9.6 为命令clear设置别名为cl,使其在登录shell中生效
9.6.1 设置别名
[root@localhost test]#alias
[root@localhost test]#alias cl=clear
[root@localhost test]#cl
9.6.2 其在登录shell中生效
1. 修改配置文件
[root@localhost test]#vim /root/.bashrc
加入
alias cl='clear'
2. 使其生效
[root@localhost test]#source /root/.bashrc
3. 测试
[root@localhost test]# bash
[root@localhost test]# pstree