For running the command lines and scripts, there are a number of available shells for the Linux platform. We’ve already talked about ZSH, one of the most popular alternatives for the classic “bash” shell. There are a number of other shells available. Each of them offers a number of different features and facilities.
Today, let’s grab and enjoy the C Shell – the shell using the C++ syntax instead of the popular and familiar “bash” syntax. It’s an old shell. However, the shell gets much love from the Unix community, especially the programmers.
For enjoying C Shell, you have to get the Tcsh – a modified version of the original C Shell with new features and enhancements.
Let’s get C Shell right away!
Installing C Shell (Tcsh)
C Shell is a very cool shell and a nice alternative to the default Bash shell. However, almost all the Linux distros don’t set C Shell by default. You have to install it and set it as the default shell manually.
Run the following command(s) according to your own Linux distro –
sudo apt install tcsh
sudo apt-get install tcsh
sudo dnf install tcsh
sudo zypper install tcsh
- Arch Linux
sudo pacman -S tcsh
- Other Linux distros
If your system wasn’t listed above, you have to manually find out the package for your system. The package should be named as “tsch” or “c shell”. Tcsh has been around for quite a long time, so your chance of finding out C Shell is pretty high.
Listing all the shells
Before we switch to the new C Shell, we have to know the location of the shell(s). Run the following command –
In most cases, you’ll get more than one available shells in your system. Run the following command for the “tcsh” only.
cat /etc/shells | grep tcsh
It’s time to shift towards Tcsh.
Now, when asked about “Login shell”, enter “/bin/tcsh” (without quotes).
Voila! C Shell is your default shell now!
Reverting back to Bash
Not interested in C Shell anymore? Run the following command for reverting back to Bash –
Enter the value –
Voila! Bash is back!