环境变量
mac篇
配置环境变量时,使用过的echo $SHELL来确认终端类型,如下

以前每个新用户的默认shell是/bin/bash,那么这里我们需要配置文件为~/.bash_profile,从macOS Catalina(10.15.x) 版开始,Mac使用/bin/zsh作为默认Shell,其对应的配置文件为~/.zshrc
配置信息例如:
export MAVEN_HOME=/usr/local/maven/apache-maven-3.6.3
export GIT=/opt/homebrew/Cellar/git/2.35.1
export PATH=$PATH:$MAVEN_HOME/bin:$GIT/bin
保存退出后,执行source ~/.zshrc更新环境变量

浙公网安备 33010602011771号