Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

I think that the export command is only active per login session, but I'm not sure. chsh I think is more permanent. Can someone clear this up for me (preferably with links/docs)? Thanks.

share|improve this question
chsh changes your login shell permanently (usually in /etc/passwd). See – ott-- Sep 27 '13 at 20:33
up vote 5 down vote accepted

chsh is generally what you want to use if you want to change your customary shell. It updates /etc/passwd so that your newly-selected shell is started upon each future login.

export SHELL doesn't do anything on its own. The SHELL variable is sometimes used by programs that want to spawn an external shell (say, to give you a command line in a certain directory, or with certain environment variables pre-set). If you want to run another shell temporarily, you would typically just run it directly like any other program. For example, if your normal shell is /bin/bash but you want to test something under /bin/tcsh, then just issue /bin/tcsh on the bash command line.

share|improve this answer
Thanks! Linking to the man pages helped. – Kevin Suttle Sep 28 '13 at 3:18
The SHELL link was the wrong link, BTW; fixed. – jjlin Sep 28 '13 at 3:21

Your Answer


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.