How to change from Bash to Tcsh shell
Mac OS X, Command Line, How to
Bash is the default shell in Mac OS X and has been since 10.3, it’s generally considered to be the de facto shell standard in the unix world. That said, there are some people who prefer to use the tcsh shell, or perhaps you just want to break away from the norm. Changing the default shell is pretty easy, but you will likely run into problems when running bash shell scripts. If you want to experiment with tcsh and use it as your default shell, here’s how to do it from the GUI in three easy steps:
Change the default shell in three steps:
- Launch Terminal.app
- From the Terminal menu, select preferences
- In preferences, select “execute this command” and type /bin/tcsh in place of /bin/bash
That’s it. Now anytime you open a new terminal it will be the tcsh shell. To revert back to bash, follow the same procedure but replace /bin/tcsh with /bin/bash.

Note: most shell scripts for OS X are written specifically for bash, and switching to tcsh will make many of these scripts no longer function properly. If you simply want to experiment with the tcsh shell, try typing tcsh at the Terminal prompt and you will load the tcsh shell temporarily. To exit the tcsh shell this way, type exit at the prompt and you will exit tcsh and be back in the bash shell.
Mac Deals from the Apple Store:
Social bookmarks:
- del.icio.us | Digg it | Furl | ma.gnolia | Netscape | reddit | StumbleUpon | Yahoo MyWeb |
Comments:
Comments: 4
Comment from Vladimir
Time: February 27, 2007, 1:41 am
Easy enough, but is there any real advantage for tcsh over bash?
Comment from cos
Time: February 27, 2007, 6:50 am
no, not really. tcsh was more popular in the early 90’s when bash was still pretty young.
(there’s also the fabulous zsh, which probably has more going for it as an “upgrade” from bash, but that’s just my opinion…)
Comment from Mike
Time: February 28, 2007, 8:44 am
You change your shell with the following commands:
chsh
passwd -s
Only requirement is that the shell is defined in /etc/shells
This way you will also have your default shell when logging in remotely through ssh (or telnet if you still use that)
Comment from Anon
Time: December 12, 2007, 5:13 pm
I prefer tcsh for my shell (completion seems more user-friendly to me), but I script in bash (better for this in general). But the warning about potential script trouble is erroneous as I understand it. That’s the whole purpose of the shebang that should be at the beginning of every script - to specify the shell which the script should use to interpret the contents of the script. Almost all scripts simply use #!/bin/sh. In most unix variants (including OS X), sh is actually a link to bash nowadays. If you’ve got a shebang in the first line of the script, it doesn’t matter what command shell you launch the script from - it’s going to be interpreted using the shell specified in the shebang.
All that being said, I’m moving into the 21st century and making the switch to zsh. I highly recommend it to people interested in this post.


Write a comment