Bash

  
 

Startup files


These files contain aliases and environment variables, and it is these aliases and environment variables that make Bash run as a user shell. after system initialization, these aliases and other variables may also be a Bash script call.

/etc /profile

default

systemwide value, set the environment for most (all Bourne shell, type and not just Bash [1])

/etc /bashrc

Bash-specific, system-wide function alias

$ HOME /.bash_profile

user-defined default environment setting, can be found in each user's home directory (the local copy is stored in /etc /profile
)

$ hOME /.bashrc

User-defined Bash initialization files, which can be found in each user's home directory (local copies are stored in /etc/bashrc
). Only interactive shell and user scripts will be available. Read this file. Please refer to Appendix K, which is an example of a .bashrc
file.



Logging out a file

$ HOME /.bash_logout

user-defined instruction file, found in each user's home directory in Sign (Bash) shell of At the time, the commands in this file will be executed.


Notes

[1]

Cannot be applied to csh, tcsh, or those with classic Bourne shell-independent shell (sh that is to say those not derived from the shell).


Copyright © Windows knowledge All Rights Reserved