Mac environment variable configuration file.bash_profile

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

Guess you like

Origin blog.csdn.net/qq_35708058/article/details/112758430