Environment variables are divided into system environment variables and user environment variables.
The environment variable you call refers to the system environment variable, which works for all users
User environment variables only work for the current user.
For example, if you want to use Java, then you add the Java Bin directory under the PATH variable, then it is the system environment variable, the user logged in, the command line input Java will have Java help information come out. And if you create a new variable under a user's variable, it will be useful only to that user, and when you log in as a different user, the variable will not exist.
This problem is relatively well understood under Linux, the system variables are in the/etc/profile file, and the user's variables are ~/.bash_profile (if bash is used), each user's user directory is not visible to other users. Suppose there are a,b,c three users, you write a statement in a variable file on the screen above a, in the output of B b,c Nothing output, System file output sys, then when you use a user login, output A; User B logs out B, user C outputs sys.
There are few settings for environment variables under windows, such as if you want to use the JDK instead of JBuilder, then you have to set up environment variables such as JDK Path,classpath.
Under Linux, the files I'm talking about are automatically generated by the system, and we can manually change the effect that he has achieved. They are automatically run when their respective users log on.
Of course, I think this can be further research, there is no time for the moment!
System environment variables and user environment variables