Files in Linux that involve environment variables

Source: Internet
Author: User

1. System level

(a)/etc/profile: When a user logs on to the operating system, the first file of the user environment is customized and applied to each user who logs on

= = "This file generally calls the/ETC/BASH.BASHRC file

(b)/etc/environment: When logging in, use the second file to read the user's profile before setting environment variables for environment files

= = System-level files, which take effect only when logging into the Linux system, require the use of the source command or reboot the system

2, user-level (located in the home directory)

(a) ~/.profile: Each user can use the file to enter shell information dedicated to their own use, and when the user logs in, the file is executed only once. By default, the execute user's. bashrc file "recommends that the user's environment variables exist in this file"

= = because "Every login is performed only once", so when you need to modify it in the process of using it, use source to make it take effect immediately, or to re-open a shell and let it take effect.

Files in Linux that involve 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.