[Ilugc] Difference between bashrc and bash_profile

  • From: andyetitmoves@xxxxxxxxx (Ramkumar R)
  • Date: Thu Jan 20 16:57:20 2005

.bash_profile is executed for login shells (eg. virutal  terminals)
.bashrc is executed for interactive shells (eg. gnome-terminal)

well..usually yes...but do remember that whether we start a login
shell or not doesn't really depend on the terminal. depends on how
bash is started - it behaves like a login shell when started with a
--login, -l or as -bash.

A modular setup could have the following components - a .login file
(or call it whatever you want) with all the environment settings, a
.bashrc with all interactive stuff like aliases, functions,
interactive bash options and startup commands, a .bash_profile with
the .login and the .bashrc sourced in, and you could preferably source
.login to your .xinitrc and .Xclients as well...this is out of
experience, so do tell me if there is a technically more correct
method....

it moves on...


read bash manual page

--
Sridhar Ratna - http://srid.bsdnerds.org
_______________________________________________
To unsubscribe, email ilugc-request@xxxxxxxxxxxxx with
"unsubscribe <password> <address>"
in the subject or body of the message.
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc



-- 
If you want to travel around the world and be invited to speak at a lot
of different places, _just_ write a Unix operating system.
                                                       - Linus Torvalds

Other related posts: