Download and Install csh / tcsh shell on Linux

Cshell is a shell (command interpreter) with C-like syntax. How do I download and install csh shell on a Linux operating system? How can I install csh on a Fedora/RHEL/CentOS Linux server? How do I install tcsh or csh on a Debian or Ubuntu Linux desktop?

csh is a command language interpreter incorporating a history mechanism , job control facilities , interactive file name and user name completion, and a C-like syntax. It is used both as an interactive login shell and a shell script command processor. tcsh is an enhanced but completely compatible version of the Berkeley UNIX C shell. In most cases csh / tcsh is installed by default. All you have to do is type shell name to start using it:
$ csh
$ tcsh

Install csh / tcsh

In case csh is not installed, type the following command at shell prompt as per your Linux distro / version.

Install it on Debian/Ubuntu/Mint Linux

$ sudo apt-get install csh

Install it on CentOS/RHEL

# yum install tcsh

Install it on Fedora Linux

$ sudo dnf install tcsh

Set csh as default login shell

To make csh as default login shell, type the following command:
$ which tcsh
$ which csh
Sample output:


Note down the /bin/csh or /bin/tcsh path. To change the shell simply type
$ chsh
$ chsh -s /bin/csh

Posted by: SXI ADMIN

The author is the creator of SXI LLC and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.