Rick Troth writes:
>> > I use bash shell.
>> > I found /etc/bash.bashrc file.
>> > What should I use this file for??
>>
>> You should leave it alone, and create a private ~/.bashrc in /root if you
>> want to customize the environment for user root. /etc/bash.bashrc should be
>> used for systemwide customizations that affect all uses, and even then you
>> are better off creating a separate /etc/bash.bashrc-local to contain your
>> local changes and modifying /etc/bash.bashrc to call your local script.
>> /etc/bash.bashrc is fair game for the Linux distributions to change at any
>> time.
>
>Dave is right.
>Avoid changing any /etc/*sh*rc* or /etc/*profile* files.
>FURTHERMORE,  /etc/bash.bashrc was installed from a package.
>Changing it will leave you vulnerable to the dreaded
>"modification management monster".   (It can get overlaid.)

Rick is right too, but there's one thing I'm surprised no one has yet
mentioned: the /etc/profile.d directory.  Local modifications to shell
profiles should be put into a new script in /etc/profile.d on Linux.  Part
of the Linux way of doing things is to provide directories into which
various packages (and admins) can drop configuration files for other
tools.  It's a kind of cheap plug-in capability.  The /etc/profile and
/etc/bash.bashrc scripts will source any scripts in there that have the
".sh" suffix.

Packages can drop files in there to get their global user environment setup
work done, without having to modify any files owned by another package.
Admins can do the same, and not have to worry about remembering to add a
line to some system file after a software update.  I usually stick a
"local-setup.sh" file in there that does my site-specific setup.
        - MacK.
-----
Edmund R. MacKenty
Software Architect
Rocket Software, Inc.
Newton, MA USA

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to