In my production environment, my default shell is an old version of csh and I cannot change it. How can I correctly login to my preferred shell? In particular, I would like to use bash. However the system bash is also very old so I compiled a newer version in ~/bin. The perfect scenario will be, I am using ~/bin/bash after login (e.g., ssh).

3 Answers 3


Put something like:

exec ~/bin/bash

in your login script (that's .login for csh).

  • Thanks. The .cshrc in my home is fixed and turns out .login is the place I should go.
    – Ivan Xiao
    Jun 4, 2013 at 1:05

Inside your .cshrc you could put an exec ~/bin/bash.

This executes bash when csh is loaded.


you need to be able to edit your /etc/passwd file


the last part is the shell loaded on login, If you want to use one in your home dir change the /bin/bash to new shell

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.