Which shell do you use?

I'm planning on switching the shell I'm currently using(tcsh) to Bash but I've read that changing the root shell to bash might be a bad idea. The main problem I have is tcsh doesn't update the directory list automatically, so that's why I'm wondering which shell do you guys use?
 
Do not, DO not, DO NOT change root's shell.

Your comments lead me to believe that you are doing everything on your system as root. This is also a bad idea.

Create a user account for yourself, and select any shell you want. Give yourself SU and/or sudo access so you can still maintain the system. But try to do as little as root as possible.

That said, I use bash and ksh93 about half/half.
 
cajunman4life said:
Do not, DO not, DO NOT change root's shell.

Your comments lead me to believe that you are doing everything on your system as root. This is also a bad idea.

Create a user account for yourself, and select any shell you want. Give yourself SU and/or sudo access so you can still maintain the system. But try to do as little as root as possible.

That said, I use bash and ksh93 about half/half.

Haha don't worry I have my own user account in the wheel group so that's nothing to worry about. Also I have my user account shell as bash and my root account shell to tcsh. I've read, which makes perfect sense, that you shouldn't change your root shell because once an update occurs, the libraries change and that you won't be able to go to root because the installed shell won't work till update. So in the end your shell won't work in root and it causes a lot of problems. I just wanted to know the reason why and such :).
 
Code:
make -C /usr/ports/shells/bash -D WITH_STATIC_BASH -DWITHOUT_NLS PREFIX=/ install

Library problem and "no mounted /usr" problem solved. The rest is paranoia. It's easy to change the shell back to csh for problem reporting if you suspect the shell to play a roll with your bug.
su(1) has quite a few advantages over sudo as shell/command wrapper, especially in machine stress situations and because sudo tries to be too smart about your environment variables.
Of course, the conservative "feed the newbies babyfood" answer is to not change root shell.
 
I've just gotten used to tcsh. The history completion (type the first letters, arrow up) is more pleasant than ^R in bash, the config syntax makes more sense, and I do anything complicated in script files anyway.
Besides, it's one less thing I need to install. :)

The rehash thing is slightly annoying, granted - I'm thinking about just setting it to run whenever tcsh displays a new prompt. (The overhead is so small these days that running it each time I press enter in a shell really doesn't worry me).
 
csh for every user on my system ..

See ... csh is the default root shell .. so why shouldn't I use it as the default shell for my system users as well??

After a while, users get used to use csh and switching back and forth between a regular users and root makes it even easyer for newcomers .. after all thye've all been using csh for moment one on a daily basic .. so .. there's no real need to go switching from shell to shell according to suit a particular user's need.

Even so .. if a particular user feels unconfy with csh... well... that woud make him a minority .. and minorities (as well as exceptions), constitut no base upong wich general rules should be created.

Scripting is still confined to sh thouhg ...or Perl :D

Yet still ... users are free to change their shell to something else that better suit their needs at the drop of a hat. I ain't forcing anyone to use csh after all...

My two cents.

PS: I'm willing to pay a reasonable price for this two books, since they are downright impossible to get around here: Unix C Shell Field Guide (Paperback) and C Shell Quick Reference Guide (Paperback). No matter what state their are in ... I just can't get them over here. So if you happen to have a spare copy, please let me know and we will work someting out.

Thanks
Best Regards
Gonzalo

PS: wouldn't it be a good idea to setup a "sell/buy subforum"?? .. just a thought ...i mean .. what's nothing to some ... means a lot to others around the globe ...

Regards
 
Mel_Flynn said:
Code:
make -C /usr/ports/shells/bash -D WITH_STATIC_BASH -DWITHOUT_NLS PREFIX=/ install

Library problem and "no mounted /usr" problem solved. The rest is paranoia. It's easy to change the shell back to csh for problem reporting if you suspect the shell to play a roll with your bug.
su(1) has quite a few advantages over sudo as shell/command wrapper, especially in machine stress situations and because sudo tries to be too smart about your environment variables.
Of course, the conservative "feed the newbies babyfood" answer is to not change root shell.

Wow, thank you for such a great post. I didn't know you could do that and also thank you for not feeding me "baby food".
 
gnemmi said:
csh for every user on my system ..

See ... csh is the default root shell .. so why shouldn't I use it as the default shell for my system users as well??
Cause the default shell for users is sh? csh is BSD historical for root, I don't think there are any valid technical reasons other then "importing a new root shell or switching to sh gives too many noise on mailing lists", but I'll gladly be corrected on this topic.

It's quiet inconvenient to install software on a vanilla machine using csh, cause you have to rehash all the time. Of course I never spent time investigating csh, so I might be missing a shell feature to set auto rehash.
 
Yes ..I considered "rehash" briefly ... but .. root has to rehash all the time .. so .. why not getting newcomer to get used to the habit of rehashing?

After all .. newcomers are "someday will be root" or will have to work as root eventually .. son why not getting them accuaitend with rehash from moment one??

By the time they get to be root "rehash" wil be second nature to them ...

Learning to do a rehash after years of not using it ... is quite annoying .. so why not avoiding that from the ground up???

That's the way I see it (and I'm far from having an absolute truth on this matter or any onther ...) it's the best way to go.

I mean .. If you're going to do something ... why not leraning it the right way from the very beginning??

On a side note .. rehash is not only a good habit .. but also a good practice that let's you know more about some of the most simpler internals of you OS of choice :)

Mel@:It's quiet inconvenient to install software on a vanilla machine using csh, cause you have to rehash all the time. Of course I never spent time investigating csh, so I might be missing a shell feature to set auto rehash.

Yes ... and I probably falll in the same cateory too ... we need books on Csh ... that was why I was asking for Unix C Shell Field Guide (Paperback) and C Shell Quick Reference Guide (Paperback) :(

But i've got the feeling that, even if you don't like it _that_ much or are still not quite convinced.. you do know where I'm aiming at :)

Now, and back to the books .. it would really be a good thing to have them both at hand...
 
My choices are:
#! /bin/sh for scripting
ZSH for interactive use
CSH for root account (also often the first thing I type on the root prompt is 'zsh' if its avialable)
 
I use tcsh (and sometimes sh) on the command line. The "rehash problem" is really not a problem for me. It takes about 0.2 seconds to type and execute the command, and I usually don't install very many programs every day. So in an average week I think I loose about 1 second because of "rehash" ;)

gnemmi said:
Scripting is still confined to sh thouhg ...or Perl :D

Absolutely! Although I tend to use Perl more than sh. :D
 
Using csh. When running and testing some scripts switching from csh to sh or bash if needed but more simple to add at the start of script file signature like #!/bin/sh #!/usr/bin/perl etc.
 
sverreh said:
I use tcsh (and sometimes sh) on the command line. The "rehash problem" is really not a problem for me. It takes about 0.2 seconds to type and execute the command, and I usually don't install very many programs every day. So in an average week I think I loose about 1 second because of "rehash" ;)

Absolutely! Although I tend to use Perl more than sh. :D

I love me some Perl, but *many* things are still done more appropriately as a shell script.
 
estrabd said:
I love me some Perl, but *many* things are still done more appropriately as a shell script.

When it comes to system administration, I agree totally. However, I am not a sysadm (except for the desktop at home), and many of my scripts at work rely heavily on regexp. And there Perl really shines. :e
 
vermaden said:
My choices are:
#! /bin/sh for scripting
ZSH for interactive use
CSH for root account (also often the first thing I type on the root prompt is 'zsh' if its avialable)

+1 but I never change my shell under root. even if it's avalable. Even the zsh guys don't suggest it for root.

I can't begin to explain the problems that could occure if the root shell is changed.
 
Citsakots said:
I'm planning on switching the shell I'm currently using(tcsh) to Bash but I've read that changing the root shell to bash might be a bad idea.

I'll agree with other sentiments on the thread. Leave root's shell alone. If you want a root (for functional purposes) account with a special shell, then set up the toor user.

Two easy steps:

# chpass -s /usr/local/bin/bash toor

# passwd toor

Voila. Use su - toor from a regular user account.

The main problem I have is tcsh doesn't update the directory list automatically, so that's why I'm wondering which shell do you guys use?

I use tcsh for interactive shells (even on a Linux workstation), and sh for scripting everywhere (FreeBSD, Linux, Solaris).
 
I generally use ZSH for everything. No, I have not changed the root shell. I just use sudo, which preserves env vars.
 
cajunman4life said:
Do not, DO not, DO NOT change root's shell.

I changed my root's shell to zsh sometime in 2005 and have not had a single problem. zsh is installed in /bin on my machine, and all of the libs are outside of /usr, so basically, I have zsh in the base system. It works great and I would recommend it to anyone who is willing to take the couple of careful steps needed. I have this same setup on four different computers; three are FreeBSD and one is CentOS Linux (sigh).

I personally don't like [t]csh because it uses a different language than sh. It does not make sense to me to switch back and forth, and I don't feel the need to learn csh scripting.
 
Back
Top