.bash

  

/etc/profile: This file sets the environment information for each user of the system. When the user logs in for the first time, the file is executed. The shell is collected from the configuration file in the /etc/profile.d directory. Settings. /etc/bashrc: This file is executed for each user running the bash shell. When the bash shell is opened, the file is read.~/.bash_profile: Each user can use this file to enter their own The shell information used, when the user logs in, the file is only executed once! By default, he sets some environment variables and executes the user's .bashrc file.~/.bashrc: This file contains bash information specific to your bash shell. The file is read when logging in and every time a new shell is opened.~/.bash_logout: Execute the file each time you quit the system (exit the bash shell).

Also, /The variables set in etc/profile (global) can be applied to any user, and the variables set in ~/.bashrc, etc. (local) can only inherit variables in /etc/profile, they are "father & son" Relationship.

~/.bash_profile is interactive, login way to bash run ~/.bashrc is handed over Formula way into non-login bash often run both disposed substantially identical, so that the former will typically call the latter.

Copyright © Windows knowledge All Rights Reserved