- 進入當前用戶的home目錄
cd ~/
- 創(chuàng)建.bash_profile文件:(已有的可以直接打開)
touch .bash_profile
- 打開.bash_profile 并編輯
open .bash_profile
- 之后就打開了一個記事本尤误,會顯示你之前配置過的path,根據(jù)自己需要去配置
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
export PATH=/Users/wangcan/flutter/flutter/bin:$PATH
export ANDROID_HOME=/Users/wangcan/Library/Android/sdk
export PATH=${PATH}:${ANDROID_HOME}/tools
export PATH=${PATH}:${ANDROID_HOME}/PLATFORM-tools
export PATH="$PATH:/Users/wangcan/Desktop/depot_tools"
export PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/X11R6/bin
export NODE_HOME=/usr/local
export PATH=$PATH:$NODE_HOME/bin
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
- 修改完之后敏簿,記得保存净薛,然后關閉文件
- 修改后的配置擂送,生效:
source .bash_profile