Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .