1. Enter the environment variable configuration file
open .bash_profile
vim .bash_profile
needs to activate
source .bash_profile after modification
2. How to solve the problem of needing source ~/.bash_profile to take effect every time?
1. Open the .zshrc file (do not create one by yourself: vim .zshrc)
2. Add a line: source ~/.bash_profile and close the file
3. Execute source ~/.bash_profile again, the source is not needed next time you restart the terminal