How To Install And Use C Shell In Ubuntu?

How To Install And Use C Shell In Ubuntu?

   

This post was last updated on August 1st, 2020 at 04:05 pm

A Unix shell is a program that interprets the commands or scripts and acts as an intermediary between user and kernel of the system.

Like bash, zsh, ksh, fish and many other shells csh is also a Unix shell. It was developed by Bill Joy. Its syntax is based on the c programming language.

It was originally developed for BSD OS. The tcsh shell is an improved version of csh(c shell). Ahead in this article, we will discuss the installation and usage of c shell in Ubuntu, Linux mint, or a distribution based on them.

How to Install csh (C Shell) in Ubuntu?

On Ubuntu, c shell is currently available in the universe repository. In order to install it in your system, you need to enable this repository.

Now to install the csh in your system use the following command –

sudo apt-get install csh

Press y if ask for confirmation –

Now the installation is complete and your system has multiple shells installed.

How to Use csh?

Bash is the default shell for many Linux distributions. To access the csh from a bash prompt, run the following command in your terminal –

csh

By default, csh uses a % (percent) symbol for its prompt. To exit from the c shell use the following command –

exit

Make csh as your default shell

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

whereis csh

Now you can see /bin/csh is its location.

To make it you default shell use the following command –

chsh -s /bin/csh

The root user can make csh default for a specific user with –

chsh -s /bin/csh user_name

Now replace the user_name with the actual user in your system. If you want to make bash again as your default shell then use the following command in your terminal –

chsh -s /bin/bash

Conclusion

The main objectives of designing csh were that it should look more like the c programming language and it should be more interactive. An improved version of csh called tcsh is available for Linux or Unix systems. We will discuss it in some other article. If you have a query or suggestion related to this topic then you can write to us in the comments below.

Previous How To Use Cron to Schedule a Task In Linux/Unix?
Next How To Install Korn Shell in Ubuntu?

About author

You might also like

Linux Terminal 0 Comments

How To Use less Command To Read The Content Of A Text File In Linux, Unix or FreeBSD?

This post was last updated on August 1st, 2020 at 05:16 pmThere are many ways to read a text file in Linux or Unix operating system. You can use a

Linux Terminal 0 Comments

How To Use Lynx For Web Browsing Through Terminal in Linux?

This post was last updated on August 1st, 2020 at 09:31 pmLynx is a text-based web browser that is used to browse the internet through Linux Terminal. It displays the

Linux Terminal 0 Comments

How To Mount And Unmount File Systems From The Linux Terminal?

This post was last updated on August 1st, 2020 at 12:13 pmIn Linux or Unix, mount command is used to mount(attach) a filesystem or storage device to a specific directory

0 Comments

No Comments Yet!

You can be first to comment this post!

Leave a Reply