macbook 改了bash_profile后每次机器重启或者重新打开机器都需要source才可以

1、vim ~/.zshrc文件, 加入以下行
source ~/.bash_profile
2、输入以下命令查看,当创建.zshrc后,把.bash_profile的内容移动到.zshrc,自此问题解决

ps -p $$
  PID TTY           TIME CMD
30960 ttys024    0:00.07 -zsh

原因:
在今年苹果公司发布了macOS Catalina(10.15),macOS的默认终端从bash变成了zsh,也就是10.15后的系统设置alias需要做此类步骤

posted @ 2020-08-12 20:03  sihte  阅读(437)  评论(0编辑  收藏  举报