[Ilugc] Difference between bashrc and bash_profile

  • From: suraj@xxxxxxxxxxx (Suraj)
  • Date: Thu Jan 20 17:27:33 2005

Ramkumar R wrote: 
,----
| 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....
`----

I maintain the following:

.bashrc -- all variables, aliases.
.bash_profile -- nothing  but a  shell script that  determines what it
should start for the "session". (ie.,. screen)
functions.sh --  shell functions that are  invoked regularly ('emacs',
'dirrc', etc.,.)

At work,  since I will have  to login to several  hundred machines and
since some machines dont  have some capabilities (depending on whether
they are 'production' or  'development' boxes) the "session" part gets
modified accordingly  (ie.,.  whether it should  run ssh-agent, screen
or simply give a shell, etc.,.)

cheers,

  -Suraj

-- 
,-----------------[http://www.symonds.net/~suraj/]---o
| The kanjira is an instrument without shruti.
`------------------------------[suraj@xxxxxxxxxxx]---o

Other related posts: