tcsh ( “tee-see-shell”, “tee-shell”, or as “tee see ess aitch”, <code>tcsh</code>) is a Unix shell based on and backward compatible with the C shell (<code>csh</code>).

Shell

tcsh is essentially the C shell with programmable command-line completion, command-line editing, and a few other features. Unlike the other common shells, functions cannot be defined in a tcsh script and the user must use aliases instead (as in csh). It is the native root shell for some BSD-based systems, including FreeBSD 13 and earlier. (FreeBSD 14 changed the default root shell to <code>sh</code> to match the default user shell whereas OpenBSD uses the Korn shell <code>ksh</code> for both root and regular users.)

tcsh added filename and command completion and command line editing concepts borrowed from the TENEX operating system, which is the source of the “t”. Because it only added functionality and did not change what was there, tcsh remained backward compatible with the original C shell. Though it started as a side branch from the original csh source tree that Bill Joy had created, tcsh is now the main branch for ongoing development.

tcsh is very stable but new releases continue to appear roughly once a year, consisting mostly of minor bug fixes.

On many systems, such as macOS and Red Hat Linux, <code>csh</code> is actually <code>tcsh</code>. Often one of the two files is either a hard link or a symbolic link to the other, so that either name refers to the same improved version of the C shell (although behavior may be altered depending on which name is used).

On Debian and some derivatives (including Ubuntu), there are two different packages: csh and tcsh. The former is based on the original BSD version of csh and the latter is the improved tcsh.

History

The “t” in <code>tcsh</code> comes from the “T” in TENEX, an operating system which inspired Ken Greer at Carnegie Mellon University, the author of tcsh, with its command-completion feature. Greer began working on his code to implement Tenex-style file name completion in September 1975, finally merging it into the C shell in December 1981. and its descendants like DragonFly BSD and DesktopBSD.

See also

  • Comparison of command shells

References

  • tcsh releases
  • tcsh mailing list
  • tcsh manual page
  • Archive for the O'Reilly book "Using csh and tcsh"