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

RE: .bashrc and .bash_profile



Good. 
Where do you recommend to put ENV.bash (an environment setup for the group), in .bashrc or in .bash_profile?

________________________________

From: redhat-sysadmin-list-bounces redhat com on behalf of James Olin Oden
Sent: Fri 11/2/2007 11:18 AM
To: redhat-sysadmin-list redhat com
Subject: Re: .bashrc and .bash_profile



On 11/2/07, Zhou, Jingchen <jingchen slac stanford edu> wrote:
> I am new to bash. It looks like there are two initialization files .bashrc and
> .bash_profile in $HOME which are generated when creating new accounts on
> Linux.

I'll try to answer, but if I'm wrong someone please correct me.

> Why there are two? What is each one for?
.bash_profile is meant for login shells and interactive sessions.
.bashrc is used for
non-interactive sessions.  They effectively both get sourced in, but
you never want
to put stuff in .bashrc that would cause stuff to be displayed, or
worse ask for
user input.

> Can I make them as one, e.g. moving things from  .bash_profile to .bashrc, and
> only use .bashrc?
Yes provided you take into account what I said above.

>
> Thanks,
Your welcome...james

--
redhat-sysadmin-list mailing list
redhat-sysadmin-list redhat com
https://www.redhat.com/mailman/listinfo/redhat-sysadmin-list


<<winmail.dat>>


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