美文网首页
修改环境变量 mac windows ubuntu

修改环境变量 mac windows ubuntu

作者: 汉江岳 | 来源:发表于2020-04-30 10:57 被阅读0次

环境变量的概念

The PATH variable is a list of directories where each directory​ contains a UNIX executable file (or its alias) for a command/program.

When a command is entered in the terminal, it searches for an executable file with the same name as the entered command in the PATH variable. In the event that the required file is not found, the terminal will respond​ with an error message saying that the command was not found.

  • Mac path
  1. for all user
/etc/paths    # root
  1. user XXX only
# 追加 export 语句
/Users/XXX/.bash_profile   # exprot ...
or 
/Users/XXX/.bashrc  # export 

# for example
export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk-12.0.1.jdk/Contents/Home"

# source
source .bashrc
  • Windows
  • Ubuntu
    同理

相关文章

网友评论

      本文标题:修改环境变量 mac windows ubuntu

      本文链接:https://www.haomeiwen.com/subject/cmxzwhtx.html