Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

In /bin, I see bash, but no csh or tcsh. When I created a ".cshrc" file in my home directory, it had no effect; that's how I discovered this problem.

So the question is this: how do I switch to csh/tcsh type of login?

Thanks for your help.

share|improve this question

2 Answers 2

As with any software in Ubuntu you need to install it:

sudo apt-get install csh

and you can use csh on command line to start it.

Same for tsch (is in Universe):

sudo apt-get install tcsh

and you can use tcsh on command line to start it.

By the way had you typed csh in command line you would have seen:

csh
The program 'csh' can be found in the following packages:
 * csh
 * tcsh
Try: sudo apt-get install <selected package>

The Ubuntu.com wiki explains how to switch permanently:

Changing your login shell which is permanent

You will use a program called chsh. There is a interactive method and non-interactive method. Type this into your terminal.

INTERACTIVE METHOD

chsh

This results in a brief dialog in which the user is prompted first for its password and then for the full path of the desired new shell.

Caution should be exercised when changing one's default shell because it is possible to make an error that only the root user (i.e., system administrator) can repair (although it should be easy for a skilled user to repair it on a home system). In particular, it is important to first test the shell temporarily in the current session and then to make certain that a valid shell name is being entered when making the permanent change.

NON-INTERACTIVE METHOD

I will use csh as again an example.

chsh -s /bin/csh

The -s sets it for you without having to go into the editor to do it.

Okay you did the command and it went ok.but the echo says it is the same. Log out and back it for the change to take effect.Then do echo $SHELL. You should see it show the new shell.

share|improve this answer

Install tcsh:

sudo apt-get install tcsh

Set tcsh as your login shell:

chsh -s /bin/tcsh

After your next login tcsh will be used as your interactive shell.

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.