From owner-freebsd-questions Tue Feb 10 22:16:33 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA00326 for questions-outgoing; Tue, 10 Feb 1998 22:16:33 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from jason01.u.washington.edu (root@jason01.u.washington.edu [140.142.70.24]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA00303 for ; Tue, 10 Feb 1998 22:16:28 -0800 (PST) (envelope-from jcwells@u.washington.edu) Received: from saul7.u.washington.edu (root@saul7.u.washington.edu [140.142.82.2]) by jason01.u.washington.edu (8.8.4+UW97.07/8.8.4+UW97.05) with ESMTP id WAA12058; Tue, 10 Feb 1998 22:16:25 -0800 Received: from s8-37-26.student.washington.edu (S8-37-26.student.washington.edu [128.208.37.26]) by saul7.u.washington.edu (8.8.4+UW97.07/8.8.4+UW97.04) with SMTP id WAA24747; Tue, 10 Feb 1998 22:16:24 -0800 (PST) Date: Tue, 10 Feb 1998 22:15:29 -0800 (PST) From: "Jason C. Wells" X-Sender: jason@s8-37-26.student.washington.edu Reply-To: "Jason C. Wells" To: spork cc: questions@FreeBSD.ORG Subject: Re: bash question In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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