Tags:
create new tag
, view all tags
See BLT.

Contents


.rc vs. _profile files

Files like .bashrc and .bash_profile are two of several files that can be used to setup the configuration of bash, including aliases, environment variables, and the path.

From http://ctdp.tripod.com/os/linux/usersguide/linux_ugenvironment.html:

<quote>
The following scripts are run by bash if the -noprofile option is not used with the shell:

/etc/profile
This script file is run first for all users during the login process

$HOME/.bash_profile
This script file is run for individual user's customized setup

$HOME/.bash_login
If the .bash_profile above does not exist, this file is run

$HOME/.profile
This script file is run if $HOME/.bash_profile and .bash_login don't exist If bash is invoked as "sh" it will run only

The man page says that "$HOME/.bashrc" is run for non-login interactive shells. I'm not sure if it also runs for login interactive shells, but believe it does. If it does, I'm not sure whether it is run after the scripts above, but believe it is.
</quote>

My comments: I saw another way of explaining the distinction between, for example .bashrc and .bash_profile once -- something related (maybe?) to the idea that you can define aliases or environment variables either place, but if you define them in one file, they're always available, and if you define them in the other file they're only available in certain circumstances -- would like to find this again.

<quote>

$HOME/.bash_logout
Run when the user logs off the system.
</quote>

Other Links

Contributors

  • RandyKramer - 22 Jan 2002
  • <If you edit this page, add your name here, move this to the next line>
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2002-01-24 - RandyKramer
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by PerlCopyright 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding WikiLearn? WebBottomBar">Send feedback
See TWiki's New Look