Linux compilation PATH addition (1) echo $ PATH view PATH (2) use the command to add exportPATH $ PATH: home & amp; times; & amp; times; bin manually added, only effective exportPATHhomelwzhangCC1200 linux compiling PATH added in the current row (1) echo $ PATH view PATH (2) run the following command to add export PATH = $ PATH:/home/×××/ bin, only valid export PATH =/home/lwzhang/CC1200/c2/daily/bin/: $ PATH (3) in the current row is added to the user directory. bashrc or. Effective automatic startup in the bash_profile File (4) unset cancel/etc/profile: This file sets the environment information for each user in the system. This file is executed when the user logs on for the first time. and from/etc/profile. the configuration file in the d directory collects shell settings. /etc/bashrc: execute this file for every user running bash shell. when the bash shell is opened, the file is read. ~ /. Bash_profile: each user can use this file to input the shell Information dedicated to their own use. when a user logs on, this file is only executed once! By default, it sets some environment variables to execute the user's. bashrc file .~ /. Bashrc: This file contains bash information dedicated to your bash shell. This file is read when you log on and every time you open a new shell .~ /. Bash_logout: execute this file every time you exit the system (exit bash shell). In addition, the variable (global) set in/etc/profile can act on any user, and ~ The variables (local) set in/. bashrc and so on can only inherit the variables in/etc/profile. they are "parent-child" relationships .~ /. Bash_profile is interactive and login to run bash ~ /. Bashrc is the interactive non-login mode that enters bash. Generally, the two settings are roughly the same, so the former usually calls the latter. Several bash initialization files-[Ubuntu] (1)/etc/profile global (public) configuration. no matter which user, the file will be read during login. (2)/ect/bashrc (I have tried it and it is easy to use) Ubuntu does not have this file, which corresponds to/ect/bash. bashrc: add the output PATH command: export PATH = $ PATH:/usr/local/arm/4.3.2/binexport PATH = $ PATH: /usr/local/arm/4.2.2-eabi/bin it is also a global (public) bash execution, regardless of the method, will read this file. (3 )~ /. Profile if bash is executed in the login mode, read ~ /. Bash_profile. if it does not exist, read ~ /. Bash_login. if the first two do not exist, read ~ /. Profile. In addition, this file will be read when you log on in graphic mode, even if ~ /. Bash_profile and ~ /. Bash_login. (4 )~ /. Bash_login if bash is executed in the login mode, read ~ /. Bash_profile. if it does not exist, read ~ /. Bash_login. if the first two do not exist, read ~ /. Profile. (5 )~ /. Bash_profileUnbutu does not have this file by default. you can create a new file. This file is read only when bash is executed in the form of login. This configuration file is usually configured to read ~ /. Bashrc. (6 )~ /. Bashrc read this file when bash is executed in the form of non-login. If it is executed in the form of login, the file will not be read. (7 )~ /. Bash_logout, which is in the longin format, will be read. That is to say, when you log out in text mode, the file will be read, and when you log out in graphic mode, the file will not be read. The following are some examples on the local machine: 1. when logging on to the graph mode, read:/etc/profile and ~ sequentially ~ /. Profile2. after logging on to the graphical mode, read:/etc/bash. bashrc and ~ in sequence when you open the terminal ~ /. Bashrc3. when logging on in text mode, read:/etc/bash. bashrc,/etc/profile and ~ in sequence ~ /. Bash_profile4. there are two cases from another user su to this user: (1) If the-l parameter (or-parameter, -- login parameter) is included, for example, su-l username, bash is lonin, which reads the following configuration files in sequence:/etc/bash. bashrc,/etc/profile and ~ /. Bash_profile. (2) If the-l parameter is not included, bash is non-login, which reads:/etc/bash. bashrc and ~ sequentially ~ /. Bashrc5. when logging out, or the user logging out of su, if it is in longin mode, bash will read :~ /. Bash_logout6. when you execute a custom shell file, if you use the "bash-l a. sh" method, bash will read the rows:/etc/profile and ~ /. Bash_profile. if other methods are used, such as bash. sh ,. /. sh, sh. sh (this does not belong to bash shell), it will not read any of the above files. 7. in the above example ~ /. Bash_profile. if the file does not exist, read ~ /. Bash_login. if the first two do not exist, read ~ /. Profile
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