Tcsh
tcsh ( “tee-see-shell”, “tee-shell”, or as “tee see ess aitch”, tcsh ) is a Unix shell based on and backward compatible with the C shell ( csh ).[src]
tcsh ( “tee-see-shell”, “tee-shell”, or as “tee see ess aitch”, tcsh ) is a Unix shell based on and backward compatible with the C shell ( csh ).[src] ==Shell== tcsh is essentially the C shell with programmable command-line completion, command-line editing, and a few other features.[src] Unlike the other common shells, functions cannot be defined in a tcsh script and the user must use aliases instead (as in csh).[src] It is the native root shell for some BSD-based systems, including FreeBSD 13 and earlier.[src] (FreeBSD 14 changed the default root shell to sh to match the default user shell whereas OpenBSD uses the Korn shell ksh for both root and regular users.[src] ) tcsh added filename and command completion and command line editing concepts borrowed from the TENEX operating system, which is the source of the “t”.[src] Because it only added functionality and did not change what was there, tcsh remained backward compatible with the original C shell.[src] 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.[src] tcsh is very stable but new releases continue to appear roughly once a year, consisting mostly of minor bug fixes.[src] On many systems, such as macOS and Red Hat Linux, csh is actually tcsh .[src] 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).[src] On Debian and some derivatives (including Ubuntu), there are two different packages: csh and tcsh.[src] The former is based on the original BSD version of csh and the latter is the improved tcsh.[src] ==History== The “t” in tcsh 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.[src] 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.[src] Mike Ellis at Fairchild A.I.[src] Labs added command completion in September 1983.[src] On October 3, 1983, Greer posted source to the net.sources newsgroup.[src] ==Significant features== Command history The built-in history command displays the previously entered commands Use of / at the command line to allow the user to select a command from the history to edit/execute Invoking previous commands using command history !![src] executes the previous command !n executes the nth command that was previously executed !-n executes the command that was executed n commands ago !string executes the most recently executed command that starts with string !?string executes the most recently executed command that contains string Using history in new commands !* - refers to all of the arguments from the previous command !$ - refers to the last argument from the previous command !^ - refers to the first argument from the previous command !:n - refers to the n th argument from the previous command !:m-n - refers to the m th through n th arguments from the previous command !:n-$ - refers to the n th through the last argument from the previous command Command line editing Auto-completion of file names and variables as well as programmable completion at the command line Alias argument selectors; the ability to define an alias to take arguments supplied to it and apply them to the commands that it refers to.[src] Tcsh is the only shell that provides this feature (in lieu of functions).[src] \!# - argument selector for all arguments, including the alias/command itself; arguments need not be supplied.[src] \!* - argument selector for all arguments, excluding the alias/command; arguments need not be supplied.[src] \!$ - argument selector for the last argument; argument need not be supplied, but if none is supplied, the alias name is considered to be the last argument.[src] \!^ - argument selector for first argument; argument MUST be supplied.[src] \!:n - argument selector for the n th argument; argument MUST be supplied; n=0 refers to the alias/command name.[src] \!:m-n - argument selector for the arguments from the m th to the n th ; arguments MUST be supplied.[src] \!:n-$ - argument selector for the arguments from the n th to the last; at least argument n MUST be supplied.[src] \!:n* - argument selector for the arguments from the n th to the last; sufficient arguments need not be supplied.[src] Alias the cd command so that when you change directories, the contents are immediately displayed.[src] alias cd 'cd \!* && ls' Wildcard matching if ( "$input" =~ [0-9]* ) then echo "the input starts with an integer" else echo "the input does NOT start with an integer" endif Job control The built-in where command.[src] Works like the which command but shows all locations of the target command in the directories specified in $PATH rather than only the one that will be used.[src] ==Deployment== tcsh has historically been in the default shell for FreeBSD and its descendants including DragonFly BSD and Mac OS X.[src] However, as of July 2026, tcsh is no longer the default shell on FreeBSD since release 14.0.[src] Prior to this release, tcsh had been the default shell of the root user, although it was not the default shell for unprivileged users.[src] As of FreeBSD 14.0, the Almquist shell is used as the default shell for both privileged and unprivileged users.[src] However, as of July 2026, FreeBSD continues to package tcsh in new installations by default.[src] Versions of Mac OS X prior to 10.3 provided tcsh as the default shell for user accounts , as a result of its nature as a descendant of FreeBSD.[src] With the release of Mac OS X 10.3, the default user shell for new accounts was altered to be bash , and this default would continue until 10.15, where it was further altered to zsh.[src] ==See also== Comparison of command shells ==References== ==External links== tcsh releases tcsh mailing list tcsh manual page Archive for the O'Reilly book "Using csh and tcsh"[src]
41 sentences · 41 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Tcsh." encyclopegia.org, 2026, https://encyclopegia.org/wiki/tcsh. Accessed 29 November 2026.
Chicago
"Tcsh." encyclopegia.org. Accessed November 29, 2026. https://encyclopegia.org/wiki/tcsh.
APA
encyclopegia.org. (2026). Tcsh. Retrieved November 29, 2026, from https://encyclopegia.org/wiki/tcsh
Accessed November 29, 2026 · CC BY-SA 4.0 · citation page · JSON