How To Install And Use Tcsh In Ubuntu?

Tcsh or TENEX c shell is a Unix shell similar to other shells such as bash, ksh, zsh, etc. It is an improved version of the c shell, t in tcsh comes from TENEX operating system. Tcsh is c shell with command-line completion, command-line editing, and few other features which are borrowed from TENEX OS.

It is the native shell for BSD based system such as FreeBSD. On systems like Mac OS X and Redhat Linux csh and tcsh refers to the same package that is improved version of C shell.

But in Debian or Ubuntu-based system, both csh and tcsh come as two separate packages. As we already discussed c shell in Ubuntu in a previous article. Today in this article we will see the installation and usage of tcsh in Ubuntu.

Features of tcsh

Some significant features of tcsh are –

  • Command-line editing
  • Auto-completion of file names and variables as well as programmable completion at the command line
  • It has a builtin history command which shows the previously entered commands
  • It has builtin where command which works like which command
  • Tcsh has wild card matching feature

Installing tcsh

As discussed above tcsh is an enhanced version of old Berkley c shell. This can be a very good alternative to bash which comes default in many Linux systems. Now to install tcsh in your system open your terminal and enter the following command in it –

sudo apt-get install tcsh

Once its installation gets completed, you can access tcsh from your terminal by using tcsh command-

tcsh

Now to get exit from the tcsh use the following command in your terminal –

exit

Make tcsh as your default shell

Before you make it your default shell, First you need to find the location where it is installed. Use the following command to find its location –

whereis tcsh

Now /usr/bin/tcsh is the location tcsh which we are looking for.

To make it your default shell use the following command in your terminal.

chsh -/usr/bin/tcsh

Or the root user can make it as the default shell for a specific user with the following command –

chsh -/usr/bin/tcsh user_name

Now replace the user_name with the actual user in your system. To make bash again your default shell, use the following command in your terminal-

chsh -s /bin/bash

Conclusion

If you don’t want to use bash then It can be a good alternative to it. By following this article you can install and use tcsh in your system. Now if you have a query or suggestion regarding this topic write us in the comments below.

Leave a Comment