Where does CentOS set JAVA_HOME

  • Where is the JAVA_HOME set up

    Some places to look first

  • system wide

    /etc/environment : Specifically meant for environment variables

    /etc/env.d/* : environment variables, split in multiple files

    /etc/profile : all types of initialization scripts

    /etc/profile.d/* : initialization scripts

    /etc/bashrc, /etc/bash.bashrc : meant for functions and aliases

  • User specific

    ~/.bash_profile : initialization for login (bash-) shells

    ~/.bashrc : initialization for all interacetive (bash-) shells

    ~/.profile : used for all shells

    ~/.cshrc, ~/.zshrc, ~/.tcshrc : similar for non-bash shells

  • References

  1. How to determine where an environment variable came from?

Guess you like

Origin blog.csdn.net/The_Time_Runner/article/details/112070878