CSH

From Linux Shell Scripting Tutorial - A Beginner's handbook
Jump to navigation Jump to search

C shell is a Unix shell crated by Bill Joy at University of California, Berkeley in the late 1970s. It is used both as an interactive login shell and a shell script command processor. The csh is a command language interpreter incorporating:

  • A history mechanism
  • Job control facilities
  • Interactive file name and user name completion
  • A C-like syntax.

Version

There are two version of csh:

  • /bin/csh - The original BSD version of csh.
  • /bin/tcsh - An improved version of csh called tcsh. On many systems, such as FreeBSD, macOS and Red Hat Linux, csh is actually tcsh.

How to install csh

On Debian, Ubuntu and derivatives one can install csh using the following apt-get command or apt command:

sudo apt install csh

How to install tcsh

On Debian, Ubuntu and derivatives one can install tcsh using the following apt-get command or apt command:

sudo apt install tcsh

How to set default shell to csh or tcsh

To change login shell for user named vivek use the chsh command[1]:

chsh -s /bin/csh vivek

OR

sudo chsh -s /bin/csh vivek

Getting more help about csh/tcsh

Type the following command at your terminal to read more about csh or tcsh:

man bash
man tcsh

References