Currently I am in /xhbin/tcsh. which command changes me to /bin/bash? Do I need to change the $SHELL variable or something like that?

link|improve this question

Changes you where for how long? – Ignacio Vazquez-Abrams Jul 15 '11 at 9:11
permanently I what I am looking for. – Mark Jul 15 '11 at 9:35
feedback

3 Answers

up vote 3 down vote accepted

To change shells temporarily, simply run the new shell. They're like any other program.

snow:~> bash

grawity@snow:~$

Use exit or Ctrl-D to go back.


To change the shell permanently, use chsh:

chsh -s /bin/bash

You must provide the full path to the new shell (use which bash to find out). Also, chsh may not work on centralized logon systems.

link|improve this answer
feedback

Just run /bin/bash? That will only last for your current session though.

link|improve this answer
feedback

As @grawity mentions, chsh may not always work. I have a server for which my login shell is ksh and I like to use bash interactively. This is my ksh .profile:

# my login shell is /bin/ksh
# this profile should spawn bash without re-invoking this profile

bash_opt='--noprofile'
[ -r .bash_profile ] && bash_opt='--login'

echo "spawning bash $bash_opt"
exec /usr/bin/bash $bash_opt
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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