Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > How do I replace tcsh with bash as default shell?

How do I replace tcsh with bash as default shell?
Thread Tools
Forum Regular
Join Date: Nov 2002
Status: Offline
Reply With Quote
Jan 20, 2003, 11:51 PM
 
I would like to replace the tcsh shell with bash so everytime I start the terminal, it will be bash and not tcsh.

Are there any other things I will need to do once I change the default? I use fink and so I assume I will need to change the .crsh file to say .../sh instead of .../csh

Thanks
     
Fresh-Faced Recruit
Join Date: Oct 2002
Location: St. Louis, MO
Status: Offline
Reply With Quote
Jan 21, 2003, 12:54 AM
 
Check out this link:

http://www.savagetranscendental.com/tip3.html

In short, go into /Applications/Utilities/NetInfo Manager, click on 'Users', click on your username, scroll the bottom pane down until you find the 'Default Shell' property, double click /bin/tcsh, and change it to /bin/bash!

the .cshrc file only handles configuration options for tcsh, not for bash. Bash is configured with .bashrc, or /etc/profile for systemwide changes.

For fink, you'll need to add this line to your .bashrc file in your home directory:

source /sw/bin/init.sh

Ta da, you are now bourne again! Welcome to my favorite shell. (Not trying to start a war though, I know some people really dig tcsh or zsh, and thats cool too! Its MLK day after all, there is room for every shell. )

peace,
sam
     
Fresh-Faced Recruit
Join Date: Oct 2002
Location: St. Louis, MO
Status: Offline
Reply With Quote
Jan 21, 2003, 02:29 AM
 
oops, double post.
     
Forum Regular
Join Date: Nov 2002
Status: Offline
Reply With Quote
Jan 21, 2003, 03:10 PM
 
Thanks for your reply. I appreciate the help. By chance does anyone know how to do this through cli? Changing tcsh -> bash that is.

Thanks
     
Dedicated MacNNer
Join Date: Nov 2000
Status: Offline
Reply With Quote
Jan 21, 2003, 04:42 PM
 
On most Unix variants you would use chsh. I'm not sure if Apple has setup chsh to modify netinfo. Give it a try and let us know the results.
     
Mac Elite
Join Date: May 2001
Location: Earth
Status: Offline
Reply With Quote
Jan 21, 2003, 05:22 PM
 
Originally posted by aquaclear:
Thanks for your reply. I appreciate the help. By chance does anyone know how to do this through cli? Changing tcsh -> bash that is.

Thanks
As far as I know, chsh will only change the local passwd file and not netinfo. To update netinfo use the following lines :

sudo niutil -destroyprop . /users/username shell
sudo niutil -createprop . /users/username shell /bin/bash

and replace 'username' with your login name.
     
Dedicated MacNNer
Join Date: Nov 2000
Status: Offline
Reply With Quote
Jan 21, 2003, 10:08 PM
 
Thanks for the info Pat. Maybe Apple should nuke chsh and replace it with a shell script.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:34 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2