Change Login Shell

Back to Technical FAQ
How do I change my login shell to bash or tcsh?

For Bash, Add the following lines to the bottom of your .login file:

if ( -f /usr/local/bin/bash) then
setenv SHELL /usr/local/bin/bash
exec /usr/local/bin/bash --login
endif

Add to the bottom of ~/.dtprofile:

DTSOURCEPROFILE=true
export SHELL=/usr/local/bin/bash

For Tcsh, Add the following lines to the bottom of your .login file:

if ( -f /usr/local/bin/tcsh) then
setenv SHELL /usr/local/bin/tcsh
exec /usr/local/bin/tcsh
endif

Add to the bottom of ~/.dtprofile:

DTSOURCEPROFILE=true
export SHELL=/usr/local/bin/tcsh

For ksh, Add the following lines to the bottom of your .login file:

if ( -f /usr/bin/ksh) then
setenv SHELL /usr/bin/ksh
exec /usr/bin/ksh --login
endif

Add to the bottom of ~/.dtprofile:

DTSOURCEPROFILE=true
export SHELL=/usr/bin/ksh

Now you should have the new shell as your default in all xterm and CDE Terminal windows.


Department of Computer Science • Stony Brook University, Stony Brook, NY 11794-4400 • 631-632-8470 or 631-632-8471