6

macOS10.15.1 的终端.app (macOS10.15.1采用的是zshell)重启后无法执行一些命令

 2 years ago
source link: https://hellodk.cn/post/95
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

macOS10.15.1 的终端.app (macOS10.15.1采用的是zshell)重启后无法执行一些命令

先检查自定义的 ~/.bash_profile 是否设置正确了
终端每次重启, 发现zsh加载的是 ~/.zshrc文件,而 ~/.zshrc 文件中并没有定义任务环境变量,这样会导致每次重启终端都需要执行source ~/.bash_profile

解决办法:
~/.zshrc 文件最后,增加一行:

source ~/.bash_profile

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK