From owner-freebsd-questions Sun Jul 11 0:39:13 1999 Delivered-To: freebsd-questions@freebsd.org Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (Postfix) with ESMTP id 82EAF14C20 for ; Sun, 11 Jul 1999 00:39:05 -0700 (PDT) (envelope-from grog@freebie.lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.9.1/8.9.0) with ESMTP id RAA00427; Sun, 11 Jul 1999 17:09:03 +0930 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.3/8.9.0) id RAA25961; Sun, 11 Jul 1999 17:09:01 +0930 (CST) Date: Sun, 11 Jul 1999 17:09:01 +0930 From: Greg Lehey To: "J. M. Albores" Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Newbie: The "PS1" environment variable & others. Message-ID: <19990711170901.S21403@freebie.lemis.com> References: <37883A86.53F55E65@bigfoot.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: <37883A86.53F55E65@bigfoot.com>; from J. M. Albores on Sun, Jul 11, 1999 at 03:32:38AM -0300 WWW-Home-Page: http://www.lemis.com/~grog X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sunday, 11 July 1999 at 3:32:38 -0300, J. M. Albores wrote: > Sorry but I'm very newbie to FreeBSD and I'd like to have a more > comfortable environment. > I'd like to setup what in Linux is "$PS1", so the shell prompt may look > like: > [userID@host /actual/path ]# > for root or "$" instead of # for non-root. > How can i set up this env-var? In exactly the same way as you would do it under Linux. I think your real question is: how do I get bash as my shell? There are three things you need to do: 1. Install the port or package. If you have the Walnut Creek CD-ROMs, do: # pkg_add /cdrom/packages/All/bash-2.03.tgz That's the correct name for the 3.2-RELEASE CD-ROMs; if you have an older version, you may have to check the name of the archive. If you don't have the packages on CD-ROM, pick it up from the web site. 2. Copy your Linux .bashrc and any other dot files to your home directory. I assume you know where you set your PS1. 3. Change your shell: run the chsh program. It should be pretty obvious what it does, but if you have trouble, use the man page. You'll find bash installed in /usr/local/bin/bash, not /bin/bash. > And, BTW three other questions: > > 1. I see two "profile", one in "/" as dot file, and one in "/etc" (???). > Is this the rule or I did something wrong? Well, you should have /etc/profile with system-wide defaults, and .profile in each user's home directory. That's the rule, and it's the same with Linux. You shouldn't have anything in /, since no user should have / as a home directory. > So: where should command aliases (not mail aliases) go? In > /etc/profile or other file like /etc/bashrc? That's in the bash man page: FILES /bin/bash The bash executable /etc/profile The systemwide initialization file, executed for login shells ~/.bash_profile The personal initialization file, executed for login shells ~/.bashrc The individual per-interactive-shell startup file ~/.bash_logout The individual login shell cleanup file, executed when a login shell exits ~/.inputrc Individual readline initialization file As far as I know, there is no /etc/bashrc. > 2. I have man pages, info, FAQ and handbook as "online" or "on-CD" > documentation. Is there any other info source in my CD's (trying to save > $$$ by online www browsing) and something like HOWTO's? Well, by now I've discovered you have the 3.0 CDs, which I no longer have online. You should seriously consider upgrading, since 3.0 was a bit of a shaky release. But there should be a lot of stuff on the CD-ROMs, though I'm not sure what you're looking for. > 3. Are CD's #3 & #4 just source files? No. Well, in 3.2-RELEASE CD-ROM 3 consists only of installable packages. But you can take a look for yourself. > I'm using Walnut Creek FreeBSD 3.0 . Greg -- When replying to this message, please copy the original recipients. For more information, see http://www.lemis.com/questions.html See complete headers for address, home page and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message