Date: Sun, 11 Jul 1999 17:09:01 +0930 From: Greg Lehey <grog@lemis.com> To: "J. M. Albores" <jote@bigfoot.com> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Newbie: The "PS1" environment variable & others. Message-ID: <19990711170901.S21403@freebie.lemis.com> In-Reply-To: <37883A86.53F55E65@bigfoot.com>; from J. M. Albores on Sun, Jul 11, 1999 at 03:32:38AM -0300 References: <37883A86.53F55E65@bigfoot.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990711170901.S21403>
