MAC Environment Setup

Mac executes the source ~/.bash_profile configuration every time

You configure environment variables in ~/.bash_profile, but the Settings do not take effect after each terminal restart. You need to run $source ~/.bash_profile again

ZSH loads the ~/.zshrc file, and the ‘.zshrc ‘file does not define the task environment variables.

At the end of the ~/.zshrc file, add a line:

source ~/.bash_profile

HomeBrew domestic installation

Using a new Mac computer development, Homebrew is not installed, but the domestic access to Github, very unstable. Run/bin/bash – c “$(curl – fsSL raw.githubusercontent.com/Homebrew/in… As shown below.

/bin/ ZSH -c “$(curl -fssl gitee.com/cunkai/Home…) “

NVM installation

brew install nvm
Copy the code

Once installed, you must add the following line to your.bash_profile to allow you to use NVM directives directly from your shell

source $(brew --prefix nvm)/nvm.sh
Copy the code

Re-source your.bash_profile to make it work

source ~/.bash_profile
Copy the code

The ~ symbol represents your home directory,

.bash_profile is a hidden file that is used to configure the Bash shell. Source ~ /.bash_profile is used to modify this configuration file to take effect immediately.