Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Jul 1999 15:22:57 +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:  <19990712152257.J21403@freebie.lemis.com>
In-Reply-To: <37896B5E.AD390164@bigfoot.com>; from J. M. Albores on Mon, Jul 12, 1999 at 01:13:18AM -0300
References:  <37883A86.53F55E65@bigfoot.com> <19990711170901.S21403@freebie.lemis.com> <37896B5E.AD390164@bigfoot.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday, 12 July 1999 at  1:13:18 -0300, J. M. Albores wrote:
> Greg Lehey wrote:
>>
>> On Sunday, 11 July 1999 at  3:32:38 -0300, J. M. Albores wrote:
>>> [...]
>>> I'd like to setup what in Linux is "$PS1", so the shell prompt may look
>>>       [userID@host /actual/path ]#
>> [...]
>> 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...
>> [...]
>> 2.  Copy your Linux .bashrc and any other...
>> [...]
>>
>> 3.  Change your shell: run the chsh program...
>> [...]
>
> First of all, thanks for you answer, Greg.

You're welcome.

> Well... In fact I had found the "chsh" command browsing man pages and I
> was using /bin/sh, as I didn't find bash-VER.tgz in my CD-ROM even I
> didn't do an intensive search, and I am not used to csh.
> But -if it's possible in this list- I would like to ask other question:
> Does C shell have any advantage over bash or sh? I was surprised that
> (after a short experience with Linux) csh was the default shell for root
> after FreeBSD installation!

csh is the traditional Berkeley shell.  It developed independently of
the Bourne shell, and for a while it had (barely) better command line
editing.  Nowadays I can't see that it has any advantages at all.

> Which is convenient for which purpose?

You need a Bourne-style shell for scripts.  You *can* write scripts in
csh, but in practice few people do.

>>> 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.
>> [...]
>
> In my machine, every user has his own .profile at ~/ by default.
> If I log as root, my /.profile is the same of /root/.profile. 
>
> If I edit one file, the other changes too. And /.profile is NOT a
> symlink to /root/.profile. (?!) It has just "common" file
> permissions. I don't understand this.

It could be a normal link.  What do you get from this:

  ls -ali /.profile /root/.profile

The 'i' tells ls to list the inode numbers.  If they're the same,
they're the same file.  Some editors will write back to the same file,
others, like Emacs, will create a new file.  The results on the
"other" file are very different.  In the first case, they're still the
same after editing; in the second case, the "other" file still has the
old contents, and the edited file only has the new contents.

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?19990712152257.J21403>