admin管理员组

文章数量:1566223

在 Mac 系统中更推荐修改 ~/.bash_profile而不是 ~/.bashrc。原因是在 Mac 系统下,~/.bashrc仅会本次生效,一旦关闭 shell 就会失效。

步骤

  1. 在命令行中输入以下内容,打开.bash_profile文件:

    vim ~/.bash_profile
    
  2. 添加你自定义的指令,例如:

    alias la = 'ls -a'
    
  3. 保存并退出:ESC + :wq

  4. 更新配置文件

    . ~/.bash_profile
    

本文标签: 自定义指令系统Mac