Date: Wed, 12 Feb 2003 11:29:41 -0500 From: Jim Trigg <jtrigg@scadian.net> To: freebsd <freebsd-questions@FreeBSD.org> Subject: Re: bash Message-ID: <20030212162941.GA46589@scadian.net> In-Reply-To: <20030212152208.GA2237@gothmog.gr> References: <OE13Rqf69aZbLAX3cf300007b5a@hotmail.com> <20030212152208.GA2237@gothmog.gr>
index | next in thread | previous in thread | raw e-mail
On Wed, Feb 12, 2003 at 05:22:08PM +0200, Giorgos Keramidas wrote:
> 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.
That is true but not quite accurate; bash will only run one of the
three, so if you have a .bash_login (for example), putting the command
in .profile will have no effect, and there is no point to having both
.bash_profile and .bash_login as only .bash_profile will get used.
Jim
--
Jim Trigg, Lord High Everything Else O- /"\
\ / ASCII RIBBON CAMPAIGN
Hostmaster, Huie Kin family website X HELP CURE HTML MAIL
Verger, All Saints Church - Sharon Chapel / \
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030212162941.GA46589>
