csh is root's shell?

d.kulinski at gmail.com d.kulinski at gmail.com
Tue Oct 5 23:03:47 PDT 2004

Hello Geoff,

Tuesday, October 5, 2004, 6:00:51 PM, you wrote:

>> >Well, per
>> >http://www.freebsd.org/cgi/cvsweb.cgi/src/etc/master.passwd?rev=1.1&conte
>> >nt-type=text/x-cvsweb-markup it looks as if /bin/csh was root's shell as
>> >of Revision 1.1, Sun Jun 20 13:41:37 1993 UTC (11 years, 3 months ago) by
>> >rgrimes.
>> >
>> >No, I didn't check to see if it had changed back & forth in the interim.
>> Wow.  I must have been carrying my passwd files along with my upgrades
>> since forever.  I don't have a single system that has csh as root's shell.
> I imagine it was made the default because of its supposed friendly
> interactivity features.  I personally find it quite the contrary (no
> offense to Bill Joy of course), as do plenty of others.  Google on 'csh
> considered harmful' for a compelling argument.
> The nice part about having csh as the default root shell is that
> it actually discourages use of the root login.  That nasty csh is
> a constant reminder for me that I'm logged in as root and probably
> shouldn't be.  ;)

I don't know what do you want from csh, (which is in fact tcsh), I was
for a long time a bash fan, but once I was motivated to try tcsh, and
it turned out that it's pretty good shell, it even has some features
that aren't available in bash.
I know that by default it looks terrible, but after setting some
options it's pretty decent, here is part of my .cshrc, some options
for other people might be annoying, and should be modified.

if ($?prompt) then
        # An interactive shell -- set some stuff up
        set prompt = "`hostname -s`# "
        set filec
        set history = 100
        set savehist = 100
        set mail = (/var/mail/$USER)
        if ( $?tcsh ) then
                bindkey "^W" backward-delete-word
                bindkey -k up history-search-backward
                bindkey -k down history-search-forward
                #nicer than default prompt
                set prompt = '%n@%m:%/%# '
                #time on the right side
                set rprompt = "%P"
                #tab behaves more like in bash
                set autolist
                #auto correction
                set autocorrect
                #what should be corrected
                #change to cmd if tcsh should only suggest
                #correction for command, not arguments
                set correct=all
                #you don't need to write cd to change directory
                #just write directory i.e. /root
                set implicitcd=verbose
                #prints exit value if is different than 0
                #useful for commands that don't print anything
                set printexitvalue
                #protection against rm * :)
                set rmstar
                #shows who logs in and logs out
                set watch = ( 1 any any )
                set who="%n@%M (%a)"
                #displays stats for processes that run longer than 1
                #cpu second
                set time=(1 '%Uu %Ss %E %P %X+%Dk (max %Mk) %I+%Oio %Fpf(%Rmpf)+%Ww %rr+%ss SIG: %k %w+%c')

Best regards,
 d                            mailto:d.kulinski at gmail.com

More information about the freebsd-current mailing list