14 Replies Latest reply: Jul 14, 2010 5:59 AM by Bill Scott
macjack Level 9 Level 9 (50,510 points)
I posted about a week ago but thought it was resolved, so marked the thread solved. I'm still having issues getting my shell to default to bash…

Right now, I have a bash shell specified under Preferences > Settings > Shell > Startup > Run command "/bin/bash"…

Yet, when I finger or dscl it seems I am in a tsch shell, which I default to at times when I launch Terminal. How do I make my default shell bash and make it stay that way?

Intel24local:~ macjack$ finger $USER

Login: macjack Name: mac jack
Directory: /Users/macjack Shell: /bin/tcsh
On since Sat Jul 10 11:47 (EDT) on console, idle 1 day 21:56 (messages off)
On since Mon Jul 12 09:43 (EDT) on ttys000
On since Sun Jul 11 13:56 (EDT) on ttys001 (messages off)
Intel24local:~ macjack$ dscl . -read /Users/$USER UserShell UserShell: /bin/tcsh

Intel24local:~ macjack$



-mj

Message was edited by: macjack

iMac 24" 2.16 GHz 3GB RAM/22" external HP display, Mac OS X (10.6.3), iMac G4 17" 800 MHz 768MB/ iMac 333MHz 256 MB / a gaggle of LaCie d2s/ APC-UPS
  • 1. Re: make bash default shell?
    BobHarris Level 6 Level 6 (13,110 points)
    Have you tried the

    chsh -s /bin/bash

    command?

    You can also use System Preferences -> Accounts
    Click the padlock and unlock it.
    Control-Click on your Account -> Advanced Options
    Change your shell
  • 2. Re: make bash default shell?
    macjack Level 9 Level 9 (50,510 points)
    Thanks Bob!

    That looks right
    This a bad time for a restart, so I'll do that at a convenient time and let you know.
    btw - never saw that advanced option on Accounts till you pointed it out, nice!



    -mj
  • 3. Re: make bash default shell?
    BobHarris Level 6 Level 6 (13,110 points)
    I'm shocked! 12,528 posts, and you have not run across the Advanced Option in all that time. Then again, I guess you could be posting without reading

    Warning. Take care about what you change via Advanced Options. For example, changing your UID or GID will NOT change the ownership of existing files. Changing your home directory may not change other configuration files that think it knows the old name for your home directory.

    But changing your shell is not a problem (except all your finger memory still remembers tcsh ).

    By the way, I was a csh/tcsh user from '95 till '05, and then I switched to bash. I have never looked back.
  • 4. Re: make bash default shell?
    macjack Level 9 Level 9 (50,510 points)
    BobHarris wrote:
    I'm shocked! 12,528 posts, and you have not run across the Advanced Option in all that time. Then again, I guess you could be posting without reading


    Yes, why should I read?
    I post any old drivel... plagiarize other folks... even post cookie recipes.
    Surprisingly, I've managed to pick up a star here and there

    EDIT: Thanks for the warning, I wasn't even thinking about changing those.



    -mj

    Message was edited by: macjack
  • 5. Re: make bash default shell?
    macjack Level 9 Level 9 (50,510 points)
    OK, just got a moment to do a restart...
    worked fine... as I knew it would!

    Just out of curiosity does the chsh -s require a restart?



    -mj
  • 6. Re: make bash default shell?
    BobHarris Level 6 Level 6 (13,110 points)
    Just out of curiosity does the chsh -s require a restart?

    I think it should only require starting a new Terminal session. But that is an untested thought.

    Yes, why should I read?
    I post any old drivel... plagiarize other folks... even post cookie recipes.
    Surprisingly, I've managed to pick up a star here and there

    Well, if they are good cookies, of course you should get a Star!

    Message was edited by: BobHarris
  • 7. Re: make bash default shell?
    Bill Scott Level 6 Level 6 (11,445 points)
    NO, chsh only requires starting a new terminal session.
  • 8. Re: make bash default shell?
    Bill Scott Level 6 Level 6 (11,445 points)
    "By the way, I was a csh/tcsh user from '95 till '05, and then I switched to bash. I have never looked back. "


    Well, then, it is time to look forward. Gary Kerbaugh (MIA?) convinced me to try zsh.

    Here is my evangelical testimonial about how zsh changed my life.
  • 9. Re: make bash default shell?
    macjack Level 9 Level 9 (50,510 points)
    Thanks for that, Bill!



    -mj
  • 10. Re: make bash default shell?
    BobHarris Level 6 Level 6 (13,110 points)
    Well, then, it is time to look forward. Gary Kerbaugh (MIA?) convinced me to try zsh.

    My day job has me working cross platform (Linux, Solaris, AIX, Windows (Cygwin environment), maybe some day HP-UX, and my iMac is my window into this world). I do not manage many of these systems, but the development IT group frequently has bash installed and tcsh installed. The host OS will have some version a bourne shell of questional age, maybe ksh, maybe a POSIX shell (and maybe not). Zsh is rarely available on all the platforms, so bash serves me very well.

    I've always written bourne shell based scripts (from '85), I just did not like the bourne shell user interface (and I disliked the csh/tcsh scripting interface ). So I used csh/tcsh for my interactive shell work, and wrote bourne shell scripts. Bash allowed me to have an interactive interface I could customize to my preferences, and bourne shell scripting features I could enter from the command prompt. For it it was a win-win situation.

    But as with text editors, I do not preach, as it a users personal preference, and I respect that.
  • 11. Re: make bash default shell?
    Bill Scott Level 6 Level 6 (11,445 points)
    Oh, just try it. The first nickel bag is free. Do it for ... Gary (>>sniff!<<)

    (It compiles on anything, even SGI).
  • 12. Re: make bash default shell?
    BobHarris Level 6 Level 6 (13,110 points)
    Oh, just try it. The first nickel bag is free. Do it for ... Gary (>>sniff!<<)

    (It compiles on anything, even SGI).</div>
    Compiling isn't the problem. It is whether it is available on systems I do not control.

    It is much more annoying to train finger memory and then find it doesn't work when you switch to a terminal tab that is going to a system that does not support your preferred environment. Yes I could most likely maintain multiple different diverse profile/login/rc type files, but that is a lot of work when you are doing that for 5 or 6 platforms.

    I'm sorry Gary, but you will have to be satisfied with Bill as your devout follower
  • 13. Re: make bash default shell?
    macjack Level 9 Level 9 (50,510 points)
    I just heard from Gary and he is quite upset with you...



    -mj
  • 14. Re: make bash default shell?
    Bill Scott Level 6 Level 6 (11,445 points)
    I actually installed it in my home directory on our mail server machine so that I could use my zsh scripts.

    This is hereby an open invitation to join the party. It is the most fun you can possibly have with your clothes on.