From owner-freebsd-questions Wed Feb 12 8:29: 8 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 78F2937B401 for ; Wed, 12 Feb 2003 08:29:07 -0800 (PST) Received: from osm.michaelines.net (osm.michaelines.net [66.238.77.213]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B8E843F85 for ; Wed, 12 Feb 2003 08:29:06 -0800 (PST) (envelope-from blaise@michaelines.net) Received: by osm.michaelines.net (Postfix, from userid 1002) id 233AD20D15; Wed, 12 Feb 2003 11:29:42 -0500 (EST) Date: Wed, 12 Feb 2003 11:29:41 -0500 From: Jim Trigg To: freebsd Subject: Re: bash Message-ID: <20030212162941.GA46589@scadian.net> Mail-Followup-To: freebsd References: <20030212152208.GA2237@gothmog.gr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030212152208.GA2237@gothmog.gr> User-Agent: Mutt/1.4i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Feb 12, 2003 at 05:22:08PM +0200, Giorgos Keramidas wrote: > On 2003-02-12 08:55, Brian Henning 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