Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Feb 2003 17:22:08 +0200
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        Brian Henning <b1henning@hotmail.com>
Cc:        freebsd <freebsd-questions@FreeBSD.org>
Subject:   Re: bash
Message-ID:  <20030212152208.GA2237@gothmog.gr>
In-Reply-To: <OE13Rqf69aZbLAX3cf300007b5a@hotmail.com>
References:  <OE13Rqf69aZbLAX3cf300007b5a@hotmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2003-02-12 08:55, Brian Henning <b1henning@hotmail.com> wrote:
> I just installed bash from the ports and changed my shell with the
> chsh command.  I created a .bashrc file with a few settings and put
> it in my home directory.  When i log out and log back in the .bashrc
> is not being executed. Is there something that i need to do before
> that will work?

Bash will not, by default, read and execute the commands of .bashrc
for login shells.  If you want the commands of .bashrc to be run for
login shells too, then put the following in your .bash_profile file:

	test -f ~/.bashrc && . ~/.bashrc

This will make sure that .bashrc commands are executed both for login
and interactive shells.  The files that bash runs for login shells are
in order:

	~/.bash_profile
	~/.bash_login
	~/.profile

Any of these can include the `. .bashrc' command, but I picked
.bash_profile because it's what I commonly use.

- Giorgos


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030212152208.GA2237>