Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Aug 1997 18:24:16 -0700 (PDT)
From:      Annelise Anderson <andrsn@andrsn.stanford.edu>
To:        Stephane Raimbault <stephane@freenet.mb.ca>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: changing default shell
Message-ID:  <Pine.BSF.3.96.970803181443.6779A-100000@andrsn.stanford.edu>
In-Reply-To: <33E50250.41C67EA6@freenet.mb.ca>

next in thread | previous in thread | raw e-mail | index | archive | help


On Sun, 3 Aug 1997, Stephane Raimbault wrote:

> I would like to know how to change a users default shell from sh to csh.
> 
> Thank you for your time,
> Stephane
> 
With the command chsh.

But while you're at it, why not use tcsh?  It's like csh but has some
added enhancements, like arrow-key recall of commands and the ability
to edit those commands (correct a typo).  It is also easier to set up
your prompt with tcsh, and to get it to change when you su to root.

This would be a three-step process:

1) Install the shell (as a port or a package).  This you do as root.
The handbook contains a detailed description of installing the bash
shell.

2) Edit /etc/shells as root to make the new shell an allowed one.
The new shell will have been installed in /usr/local/bin.  You have
to get the path and the spelling right.  

3) Change the user's shell.  The tcsh shell will read the configuration
file for the csh shell (.cshrc in the user's home directory) unless you
create a .tcshrc file, which you can do by copy .cshrc.  It will also
read .login (as does csh) and the system-wide initialization files in
/etc for csh, where you put anything you want to apply to all users.

If this isn't clear let me know; I'm about to add something like the
above to the guide for new users at 
http://www.freebsd.org/tutorials/newuser/newuser.html, so your 
comments would be appreciated.

	Annelise








Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.970803181443.6779A-100000>