Boston Linux & UNIX was originally founded in 1994 as part of The Boston Computer Society. We meet on the third Wednesday of each month at the Massachusetts Institute of Technology, in Building E51.

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss] What the use of .bashrc



One thing I used to find annoying is when an upgrade would wipe out my .bashrc.
Long ago I created a .bash.d directory, within which I split up my .bashrc into
separate files for easier maintenance.

So my ~/.bashrc is a one-liner:

    source ~/.bash.d/bashrc

and ~/.bash.d/bashrc is a set of includes

    for rc in ~/.bash.d/* ; do [ -x $rc ] && source $rc ; done

Within ~/.bash.d are the files

    aliases  bashrc  completions  funcs  local  paths  prompt

"local" is for stuff specific to the one system. The other files are
common across
all my systems.


On Tue, Oct 30, 2012 at 7:50 AM, Glenn Hoffman <glennhoffman at mac.com> wrote:
> I'm teaching an Introduction to Linux/Unix class at UMass/Boston. I've just told the class about the different type of shells (login, interactive non-login in, non-interactive) and the startup files for each. I've never been able to give a class a good reason for the existence of .bashrc, since I have never used it myself. What's the reason for a separate startup file for a non-login interactive shell?
>
> Glenn
>
> _______________________________________________
> Discuss mailing list
> Discuss at blu.org
> http://lists.blu.org/mailman/listinfo/discuss



-- 
John Abreau / Executive Director, Boston Linux & Unix
PGP KeyID: 32A492D8 / Email: abreauj at gmail.com
PGP FP: 7834 AEC2 EFA3 565C A4B6  9BA4 0ACB AD85 32A4 92D8



BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org