Shell
Ninereasons (Talk | contribs) (expand) |
|||
Line 1: | Line 1: | ||
− | + | Command interpretors ('''shells''') allow programs and users to interface with the "kernel" (lower level of the operating system). Microsoft Windows users will compare the '''Unix shell''' to DOS. | |
− | + | Unix shells are traditionally CLIs (Command Line Interface) where users can type [[:Category:System Commands|system commands]] to run programs and/or manipulate files and directories, within the bounds of your [[user context]]. A CLI shell provides a set of built-in commands and utilities which you can use to automate your commands on the command line, or by using [[shell script]]s (files that contain a set of commands, which can be executed from the command line or by other scripts or programs - Windows users will compare these to ''batch files''). | |
− | + | A shell can also be a GUI (Graphical User Interface). Examples of '''GUI shells''' are the X Windows System of Unix, the Window OS of Microsoft, and the Mac OS. CLI interfaces are available in Unix-like GUI environments through terminal emulator programs like [[xterm]] or [[rxvt]]. In Windows, a CLI is provided by <code>command.com</code> or <code>cmd.exe</code>. A DOS or Windows CLI prompt usually ends with <code>></code>. | |
− | [[Category:FreeBSD Terminology]] | + | |
+ | ==Shell families== | ||
+ | The first generation shell was called <code>sh</code>, developed for Unix 1 by Ken Thompson at Bell Labs, in 1971. In the second generation, the Unix shell was re-written in two different directions: the [[Bourne shell]] (<code>sh</code>) and the [[C shell]] (<code>csh</code>). These improvements added features such as file name completion and command line editing. | ||
+ | |||
+ | Steve Bourne developed [[sh]] for Unix 7, at Bell Labs in 1978. Third generation improvements of the Bourne shell include the [[ksh|Korn shell]] (<code>ksh</code> by Dave Korn, early 1980s), the [[bash|Bourne again shell]] (<code>bash</code> by Brian Fox in 1987 - a very popular third generation shell, familiar to users of Linux, Apple Mac OS X (in the Terminal utility), and [http://www.cygwin.com Cygwin]). Bourne shell derivatives have a default CLI prompt that ends with <code>$</code>. The version of <code>sh</code> used by FreeBSD as the default command interpreter is similar to (but not the same as) the Korn shell. | ||
+ | |||
+ | Bill Joy (the creator of BSD) developed [[csh]] for BSD in 1979. Ken Greer also made improvements to the C Shell in the 1970s, called the [[tcsh|TENEX C shell]] (<code>tcsh</code>). Versions of the C shell usually have a default CLI prompt that ends with <code>%</code>. The <code>csh</code> used by FreeBSD is actually <code>tcsh</code>, which is the default [[login shell]]. | ||
+ | |||
+ | ==Alternative shells== | ||
+ | Besides the default shells ([[sh]] and [[tcsh]]), and the ports mentioned above ([[ksh]] and [[bash]]), there are a number of other powerful CLI shells available from the [[Ports|ports collection]]. Below are just a few shells that could serve as your primary login shell. | ||
+ | * [[psh]] — combines aspects of bash and other shells with [[perl]] extensions, so that a variety of perl commands can be executed directly from the command line or in scripts. | ||
+ | * [[scsh]] — provides Scheme language extensions, so that a variety of scheme code can be executed directly from the command line or in scripts. | ||
+ | * [[zsh]] — a shell that combines many features of both, the C shell and Bourne shell, and adds powerful scripting language features of its own. | ||
+ | |||
+ | To change your login shell from one to another, install the alternative shell from the [[Ports tree]] and run the [[chsh]] command. | ||
+ | |||
+ | [[Category:Shells]] [[Category:FreeBSD Terminology]] |
Revision as of 15:14, 6 June 2006
Command interpretors (shells) allow programs and users to interface with the "kernel" (lower level of the operating system). Microsoft Windows users will compare the Unix shell to DOS.
Unix shells are traditionally CLIs (Command Line Interface) where users can type system commands to run programs and/or manipulate files and directories, within the bounds of your user context. A CLI shell provides a set of built-in commands and utilities which you can use to automate your commands on the command line, or by using shell scripts (files that contain a set of commands, which can be executed from the command line or by other scripts or programs - Windows users will compare these to batch files).
A shell can also be a GUI (Graphical User Interface). Examples of GUI shells are the X Windows System of Unix, the Window OS of Microsoft, and the Mac OS. CLI interfaces are available in Unix-like GUI environments through terminal emulator programs like xterm or rxvt. In Windows, a CLI is provided by command.com
or cmd.exe
. A DOS or Windows CLI prompt usually ends with >
.
Shell families
The first generation shell was called sh
, developed for Unix 1 by Ken Thompson at Bell Labs, in 1971. In the second generation, the Unix shell was re-written in two different directions: the Bourne shell (sh
) and the C shell (csh
). These improvements added features such as file name completion and command line editing.
Steve Bourne developed sh for Unix 7, at Bell Labs in 1978. Third generation improvements of the Bourne shell include the Korn shell (ksh
by Dave Korn, early 1980s), the Bourne again shell (bash
by Brian Fox in 1987 - a very popular third generation shell, familiar to users of Linux, Apple Mac OS X (in the Terminal utility), and Cygwin). Bourne shell derivatives have a default CLI prompt that ends with $
. The version of sh
used by FreeBSD as the default command interpreter is similar to (but not the same as) the Korn shell.
Bill Joy (the creator of BSD) developed csh for BSD in 1979. Ken Greer also made improvements to the C Shell in the 1970s, called the TENEX C shell (tcsh
). Versions of the C shell usually have a default CLI prompt that ends with %
. The csh
used by FreeBSD is actually tcsh
, which is the default login shell.
Alternative shells
Besides the default shells (sh and tcsh), and the ports mentioned above (ksh and bash), there are a number of other powerful CLI shells available from the ports collection. Below are just a few shells that could serve as your primary login shell.
- psh — combines aspects of bash and other shells with perl extensions, so that a variety of perl commands can be executed directly from the command line or in scripts.
- scsh — provides Scheme language extensions, so that a variety of scheme code can be executed directly from the command line or in scripts.
- zsh — a shell that combines many features of both, the C shell and Bourne shell, and adds powerful scripting language features of its own.
To change your login shell from one to another, install the alternative shell from the Ports tree and run the chsh command.