自定义liunx命令
?
1. 创建 shellrc,用来存放对 shell 配置文件的改动
如:
?
export PATH=$PATH:~/bin alias tb="cd /home/tb_crm"
bin 用来存放可执行文件。
2. 加入shellrc 到各shell 配置文件
如.bashrc,.zshrc,加入:
?
if [ -f ~/shellrc ]; then . ~/shellrc fi 然后 source shellrc source .bashrc 就行了 执行 tb 就到了/home/tb_crm 目录