Change your login shell. What shell you like is a matter of personal preference. I can argue that if you have no preference, you should be using bash (or ksh if bash isn't available), but if you have a lifetime of experience with csh or tcsh syntax, that's what you are going to want, and chsh will do it.
Generally speaking, DON'T CHANGE root's shell. I use to see this fairly often: some SunOS person would be hired to do some work on a SCO machine. Because SunOS historically used csh, using sh was of course very painful for them, so they'd change root's shell to csh. No problem, at least until the machine rebooted. Then all hell broke loose, because the csh didn't undertand how to run the /bin/sh initialization scripts.
Nowadays, the scripts would probably begin with #!/bin/sh and that would have been less painful, but it's still a better idea to leave things as the designers expected. Nothing stops you from just typing "bash" or "csh" after you login, and that's a far safer way of conducting your business.
Chsh is also used by admins to lockout users:
chsh -s /bin/true edward
locks edward out of the system for now without changing anything else about his account. If you really need to worry about Ed, you'd also move his home directory: "mv /home/edward /home/edward.locked" (which prevents him from possibly doing things with ssh that don't involve an actual shell, like forwarding ports).
Got something to add? Send me email.
More Articles by Tony Lawrence © 2011-07-07 Tony Lawrence
One day my daughter came in, looked over my shoulder at some Perl 4 code, and said, "What is that, swearing?" (Larry Wall)