Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
TetraWiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Linux 101 hacks
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=='''Hack 84. Execution Sequence of .bash_* files'''== What is the sequence in which the following files are executed? o /etc/profile o ~/.bash_profile o ~/.bashrc o ~/.bash_login o ~/.profile o ~/.bash_logout '''Execution sequence for interactive login shell''' Following pseudo code explains the sequence of execution of these files. execute /etc/profile IF ~/.bash_profile exists THEN execute ~/.bash_profile ELSE IF ~/.bash_login exist THEN execute ~/.bash_login ELSE IF ~/.profile exist THEN execute ~/.profile END IF END IF END IF When you logout of the interactive shell, following is the sequence of execution: IF ~/.bash_logout exists THEN execute ~/.bash_logout END IF Please note that /etc/bashrc is executed by ~/.bashrc as shown below: <nowiki># </nowiki>cat ~/.bashrc if <nowiki>[ </nowiki>-f /etc/bashrc ]; then . /etc/bashrc Fi '''Execution sequence for interactive non-login shell''' While launching a non-login interactive shell, following is the sequence of execution: IF ~/.bashrc exists THEN execute ~/.bashrc END IF '''Note: '''When a non-interactive shell starts up, it looks for ENV environment''' '''variable, and executes the file-name value mentioned in the ENV variable.
Summary:
Please note that all contributions to TetraWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
TetraWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)