Ubuntu12.04 environment variable loading sequence at startup
Source: Internet
Author: User
When Ubuntu is started, the environment variable loading sequence is used to understand the startup sequence of various environment variable scripts in Linux. it is of great help for using Linux to solve various strange errors that cannot find dependent files. The process of loading environment variables during Ubuntu startup is roughly as follows: the loading sequence of environment variables during etcenvi Ubuntu 12.04 startup is clear about the startup sequence of various environment variable scripts in Linux. for Linux, it is helpful to solve various strange errors that cannot find dependent files. The environment variable loading process at startup in Ubuntu is roughly:/etc/enviroment/etc/profile -->/etc/bash. bashrc -->/etc/profile. all. sh file ~ /. Profile (or ~ /. Bash_profile or ~ /. Bash_login) --> ~ /. Bashrc (if bash is run) --> ~ /. Bash_aliases -->/etc/bash_completion the first two are system environment variables, and the last is the local environment variables of the current user. /Etc/enviroment is called first after some core components of the system are loaded. many peripheral programs depend on it to run. if there is any problem, the system may fail to start normally. As a result, the system-level public environment variable/etc/profile is first executed when the login environment is started. Equivalent to the application-level public environment variable ~ /. Profile: when the shell is opened, others/etc/profile is executed. Pay attention to application-level user environment variables ~ /. Profile is executed when the shell is opened. that is to say, if the environment variables configured in the script or the script it will call (generally. bashrc) are invalid in the graphic interface! If you want to configure an environment variable that is still valid in the graphic interface, you can create a. sh file under/etc/prfile. d/and write the corresponding content, such as JAVA_HOME.
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