System environment variables and user environment variables

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.