Date: Tue, 10 Feb 1998 22:15:29 -0800 (PST) From: "Jason C. Wells" <jcwells@u.washington.edu> To: spork <spork@super-g.com> Cc: questions@FreeBSD.ORG Subject: Re: bash question Message-ID: <Pine.BSF.3.96.980210220821.546A-100000@s8-37-26.student.washington.edu> In-Reply-To: <Pine.BSF.3.96.980210224708.15623C-100000@super-g.inch.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 10 Feb 1998, spork wrote:
> I'm stumped. I just turned one of my home machines into a dual-booter,
> and one of the things I've installed is bash. I've done this a hundred
> times, and sticking a .bashrc in my homedir has been how I get bash to do
> what I wish... For some reason, it's not being read at login. If I
> source it, it works. I also tried naming it .profile. According to the
> manpage .bashrc is correct. Perms look OK, readable by anyone.
>
> Ideas???
>
> Charles Sprickman
> spork@super-g.com
> ----
'.bashrc' is for non-login shells. '.bash_profile' is for logins.
'.bashrc' won't be read for a login shell.
BUT... You said you named it '.profile'?? '.profile' should be read by
bash. Curious.
>From the man
When bash is invoked as an interactive login shell, it
first reads and executes commands from the file /etc/pro-
file, 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.
And also
When an interactive shell that is not a login shell is
started, bash reads and executes commands from ~/.bashrc,
if that file exists. This may be inhibited by using the
--norc option. The --rcfile file option will force bash
to read and execute commands from file instead of
~/.bashrc.
So .bashrc works great in an xterm but not in a login shell.
I hope this helps.
VVVVVVV
/ 0\ / 0\ Have fun,
) Jason Wells
)-------( Wannabe Sysadmin
\_____/
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980210220821.546A-100000>
