新mac在终端执行ll命令:
zsh: command not found: ll
在根目录创建 .bash_profile 文件
新增内容 alias ll='ls -alF'
同目录下并执行 source .bash_profile,会暂时生效
但是重启mac终端窗口,再执行 ll 又是:zsh: command not found: ll
解决方案:
根目录下创建.zscrc 文件
touch .zshrc
.zshrc文件 新增内容:
source ~/.bash_profile
退出文件,同级目录下重新执行:
source .bash_profile
这时您再试一下重启 mac 终端,重试 ll 命令
如此,一劳永逸。