Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|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

3 Answers 3

up vote 4 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.

share|improve this answer

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
share|improve this answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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