Tcsh Shell Install and Configuration on Linux / Windows / Mac

This tutorial will guide you to perform a successful tcsh install and configuration of the tcsh as the default shell for your OS.

Check if tcsh is preloaded

Tcsh (alias Tenex C SHell) was also generally referenced to as the new Csh (alias C SHell) . The C and C++ programming languages were quite popular during the initial Linux days, and large portions of Linux itself is written in them. And to no surprise to no one a new shell popped up – the C Shell or Csh – that uses the vanilla C syntax model. If you are fluent in C, this shell will be natural to you.However, the Csh shell had quite a lot of bugs and not many features. This is why the Tcsh shell came to the scene. Tcsh fixed most of the bugs and added new features, such as Unfortunately, Tcsh and Bash are very different, which means you can’t run Bash scripts in Tcsh and vice versa.

Some Linux systems come preloaded with tcsh so it isn’t required to install tc shell but rather just invoke/activate it. 

  1. Open your default terminal interface.
  2. tcsh –version
  3. In case this returns a tcsh version which is alright for you, you’re done now!

Installing tcsh on Linux

Determine the distro of Linux that your system is based on. 

See the List of Linux distributions for a list. 
(Most Linux systems like the Ubuntu OS are forked from and based on the 
Debian-architecture.)

Debian-based Linux systems

Open a terminal window. Copy & paste the commands in the code area below this paragraph into the terminal window and hit Enter. You may be prompted to enter your password.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install csh

Fedora-based Linux systems

Open a terminal window. Copy & paste the commands in the code area below this paragraph into the terminal window and hit Enter. You may be prompted to enter your password.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install csh

Red Hat/CentOS-based Linux systems

Open a terminal. Copy & paste the commands in the code area below this paragraph into the terminal window and hit Enter. You may be prompted to enter your password.

sudo yum upgrade
sudo yum install tcsh

Suse-based Linux systems

Open a terminal. Copy & paste the commands in the code area below this paragraph into the terminal window and hit Enter. You may be prompted to enter your password.

sudo zypper upgrade
sudo zypper install tcsh

Installing tcsh on a Mac

If you want the latest and greatest version of tcsh in the Mac ecosystem, use the Homebrew service: Proceed with the following steps to install a recent version.

Step 1 – Install Homebrew

Homebrew simplifies the installation of most terminal based programs and softwares in the Mac OS and all other Mac installations .

Copy & paste the commands in the code area below this paragraph into the terminal window and hit Enter.

ruby -e "$(curl -fsSL https://raw.tcshhubusercontent.com/Homebrew/install/master/install)"
brew doctor

You will be requested to install the Command Line Developer Tools from Apple to continue. Confirm by clicking the Install button in the alert that pops up. After the of installation of Command Line Developer Tools is done, continue with the installation of Homebrew by hitting Enter again.

Step 2 – Install tcsh

Copy & paste the commands in the code area below this paragraph into the terminal window and hit Enter.

brew install tcsh

Optional Step 3 – default shell

This is optional but to directly call the tc shell on terminal initiation you’ll need to set tcsh as your default shell. Copy & paste the commands in the code area below this paragraph into the terminal window and hit Enter to get that done.

sudo -s 'echo /usr/local/bin/tcsh >> /etc/shells' 
chsh -s /usr/local/bin/tcsh

tc shell install on Windows

thumb_bash-for-windows
  1. Setup bash for windows using the link above
  2. To install tcsh on Windows’ Ubuntu, open the Bash shell and run the following command
    sudo apt-get install tcsh
  3. When prompted type “y”, and then press Enter to continue. Apt-get will then automatically downloads and installs tcsh from Ubuntu’s repositories.
  4. Run tcsh to start the z-shell terminal instance.
  5. To make Bash Automatically Launch tcsh
    1. Edit the “.bashrc” file using the below command
      nano .bashrc
    2. Add the following lines to the file.
      #Launch tcsh
      if [ -t 1 ]; then
      exec tcsh
      fi
      You could also simply add the “exec tcsh” line, however the following additional lines ensures that the kernel only launches tcsh when you open the Bash Terminal window. Thus avoiding problems for any other software.
    3. Hold Ctrl+O till a message appears asking to save at the upper portion of the bottom menu-bar and press Enter to save the file.
    4. Press Ctrl+X to exit nano afterward.
    5. Restart the Ubuntu shortcut (or other Linux distribution shortcut) on Windows, it starts up with the tcsh shell.

You have completed the tc shell install.

You can also check out other popular and feature-rich terminal shells for Unix here:

tcsh-install-linux-shells-compared

Leave a Reply

Your email address will not be published. Required fields are marked *