C shell

From Linux Shell Scripting Tutorial - A Beginner's handbook
Jump to: navigation, search

csh is an acronym for C SHell. However, most Linux distribution comes with an enhanced but completely compatible version of csh called Tcsh. It is a command language interpreter which can be used both as an interactive login shell and as a shell script command processor. Tcsh includes a command line editor, programmable word completion, spelling correction, a history mechanism, job control and a C language like syntax.

Install tcsh (csh) under Linux

If you are using Debian, or Ubuntu Linux, use apt-get command as follows to install tcsh:

sudo apt-get update
sudo apt-get install tcsh

If you are using Red Hat, CentOS, or Fedora Linux, use yum command as follows to install tcsh:

yum install tcsh

How do I use tcsh / csh?

Simply type tcsh at a shell prompt to use tcsh shell:

tcsh

OR

/bin/tcsh

How do I set tcsh as a default login shell[1]?

Use chsh command to change your login shell:

chsh  -s /bin/tcsh
chsh  -s /bin/tcsh username

References

External links