mac,ubuntu   環境變量

Mac OS X

  1. Open the .bash_profile file in your home directory (for example, /Users/your-user-name/.bash_profile) in a text editor.
  2. Add export PATH="your-dir:$PATH" to the last line of the file, where your-dir is the directory you want to add.
  3. Save the .bash_profile file.
  4. Restart your terminal.

Linux

  1. Open the .bashrc file in your home directory (for example, /home/your-user-name/.bashrc) in a text editor.
  2. Add export PATH="your-dir:$PATH" to the last line of the file, where your-dir is the directory you want to add.
  3. Save the .bashrc file.
  4. Restart your terminal.
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章