Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 03 Mar 2004 16:39:19 +0000
From:      Peter Risdon <peter@circlesquared.com>
To:        Bob Perry <rperry4@earthlink.net>
Cc:        FreeBSD-Questions <freebsd-questions@freebsd.org>
Subject:   Re: Help Setting Up .bashrc
Message-ID:  <40460A37.6060605@circlesquared.com>
In-Reply-To: <4043619E.4010605@earthlink.net>
References:  <4043619E.4010605@earthlink.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Bob Perry wrote:

> Hello,
>
> My environment variables indicate SHELL=/usr/local/bin/bash and
> ENV=/home/rperry/.shrc.  My understanding is that bash reads
> ~/.bashrc for interactive shells and $ENV for non-interactive shells.
> I don't have the ~/.bashrc file.  Neither do I have a ~/.bash_profile,
> or a ~/.bash_login file.
>
> I also see where the startup files for bash are .profile and .bashrc.
> One of the settings in my .profile indicates that ENV=$HOME/.shrc;
> export ENV.
>
> I've read where bash will read other files (e.g., .shrc, etc.) when 
> it's own
> initialization files are not present but I'd like to set up the 
> appropriate
> bash files anyway.  I've seen examples of the .bashrc file in some text
> but was looking for something from within FreeBSD.  I found some
> /src/share/skel/dot.* files but none for bash.  Can anyone tell me if 
> such
> sample files exists and where I might find them?  Do I need really need
> them?
>
> Thank you.
> Bob Perry
>
man bash:

When  bash is invoked as an interactive login shell, or as a non-inter-
       active shell with the --login option, it first reads and 
executes  com-
       mands  from  the file /etc/profile, if that file exists.  After 
reading
       that file, it looks for ~/.bash_profile, ~/.bash_login, and 
~/.profile,
       in  that order, and reads and executes commands from the first 
one that
       exists and is readable.  The --noprofile option may be  used  
when  the
       shell is started to inhibit this behavior.


So the skel/dot.profile is used by bash.

PWR.



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