Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

I need to switch to c-shell and after installing it via software-center it looks like I am ready to go.

Nevertheless, when I type 'csh' the line changes to %_ I am still not in a c-shell. When typing which $SHELL I get /bin/bash

Also my program is recognizing I am wrong and gives me error messages. I guess there is a simple solution?

thanks in advance

share|improve this question

The SHELL environment variable does not indicate what shell you are currently using. It is simply set, when you log in, to the value of the login shell field of /etc/passwd, which in your case is /bin/bash.

If you want to change your login shell, run chsh (change shell).

The login shell set in /etc/passwd controls, among other things, what shell is run when you open a terminal emulator, such as gnome-terminal.

To see what shell you are currently using, try ps -p $$

share|improve this answer
thanks a lot for your response! – Hydrazin Mar 8 '12 at 14:50
thanks! Indeed, I am running csh after typing csh... clear. But, I don't know why I have a strange behavior within the shell? I do not have tab completion... And my software is complaining that this might not be a c-shell (and therefore I can't install). Are there some options that I can activate? thanks again! – Hydrazin Mar 8 '12 at 14:53
@Hydrazin The shell from the csh package does not have tab-completion. tcsh does though, so maybe you want that instead. However, if all you want is to run a csh script, you do not need to run csh as an interactive shell at all. From any shell, just run csh scriptfile. – geirha Mar 8 '12 at 15:25

You need to change your default login shell and there many ways to do this. The command to change shells is --> chsh -s csh <-- will change your login shell to csh. After this it will be nessesary to logout and login to your account. --> Ctl-d <-- is for logout.

Also, you can check out all of the users login shells in the /etc/passwd file. It is the last field in the record and should be /bin/bash now. Be very careful in this file however! Incorrect settings will prevent user login!

share|improve this answer
thanks for the respond! after writing chsh -s csh I get the answer: chsh: csh is an invalid shell thanks kind of strange? – Hydrazin Mar 8 '12 at 15:02
@Hydrazin The argument to chsh -s, the shell to be set, should be an absolute path, and must be listed in /etc/shells. cat /etc/shells – geirha Mar 8 '12 at 16:24

To see what shell you are currently using, try echo $0

share|improve this answer

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.