Information about Unix Shell

Enlarge picture
Screenshot of a sample Bash session, taken on Gentoo Linux.


A Unix shell, also called "the command line", provides the traditional user interface for the Unix operating system and for Unix-like systems. Users direct the operation of the computer by entering command input as text for a shell to execute. Within the Microsoft Windows suite of operating systems the analogous program is command.com, or cmd.exe for Windows NT-based operating systems.

The most generic sense of the term shell means any program that users use to type commands. Since in the Unix operating system users can select which shell they want to use (which program should execute when they login), many shells have been developed. It is called a "shell" because it hides the details of the underlying operating system behind the shell's interface. (In contrast with the "kernel", which refers to the lowest-level, or 'inner-most' component of an operating system). Similarly, graphical user interfaces for Unix, such as GNOME and KDE, are occasionally called visual shells or graphical shells. By itself, the term shell is usually associated with the command line. In Unix, any program can be the user's shell. Users who want to use a different syntax for typing commands can specify a different program as their shell.

The term shell also refers to a particular program, such as the Bourne shell, sh. The Bourne shell was the shell used in early versions of Unix and became a de facto standard; every Unix-like system has at least one shell compatible with the Bourne shell. The Bourne shell program is located in the Unix file hierarchy at /bin/sh. On some systems, such as BSD, /bin/sh is a Bourne shell or equivalent, but on other systems such as Linux, /bin/sh is likely to be a link to a compatible, but more feature-rich shell. POSIX specifies its standard shell as a strict subset of the Korn shell.

Other types of shells

The Unix shell was unusual when first created. Since it is both an interactive command language and the language used to script the system, it is a scripting programming language. Many shells created for other operating systems offer rough equivalents to Unix shell functionality.

On systems using a windowing system, some users may never use the shell directly. On Unix systems, the shell is still the implementation language of system startup scripts, including the program that starts the windowing system, the programs that facilitate access to the Internet, and many other essential functions.

On MS-DOS, OS/2, and Windows, equivalents to Unix system scripts are called batch files, and have either a ".bat" or ".cmd" extension. A newer CLI, codenamed Monad and to be released as the Windows PowerShell, will replace the existing NT command line, cmd.exe; it has many features derived from Unix shells, though it uses a somewhat different syntax.

Many users of a Unix system still find a modern command line shell much more convenient for many tasks than any GUI application.

Due to the recent movement in favor of open source, most Unix shells have at least one version that is open source.

Shell categories

Unix shells can be broadly divided into four categories: Bourne-like, C Shell-like, nontraditional, and historical. On most modern Unix-like systems the current shell is held in the $SHELL environment variable.

Bourne shell compatible

  • Bourne shell (sh) -- Written by Steve Bourne, while at Bell Labs. First distributed with Version 7 Unix, circa 1978, and enhanced over the years.
  • Almquist shell (ash) -- Written as a BSD-licensed replacement for the Bourne Shell; often used in resource-constrained environments.
  • Bourne-Again shell (bash) -- Written as part of the GNU project to provide a superset of Bourne Shell functionality.
  • Korn shell (ksh) -- Written by David Korn, while at Bell Labs.
  • Z shell (zsh) -- considered as the most complete (read: the most features) shell: it is the closest thing that exists to a superset of sh, ash, bash, csh, ksh, and tcsh.

C shell compatible

Other or exotic

A list of various shells may be found at www.freebsd.org.

Historic

Further reading

  • Ellie Quigley (2001). "Introduction to UNIX shells", Unix Shells by Example. Prentice Hall PTR. ISBN 013066538X.  — a history of the various shells, and the uses of and responsibilities of a shell on Unix

See also

External links

command line interface or CLI is a method of interacting with an operating system or software using a command line interpreter. This command line interpreter may be a text terminal, terminal emulator, or remote shell client such as PuTTY.
..... Click the link for more information.
The user interface (or Human Machine Interface) is the aggregate of means by which people (the users) interact with a particular machine, device, computer program or other complex tool (the system).
..... Click the link for more information.
Unix (officially trademarked as UNIX®) is a computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs including Ken Thompson, Dennis Ritchie and Douglas McIlroy.
..... Click the link for more information.
An operating system (OS) is the software that manages the sharing of the resources of a computer. An operating system processes system data and user input, and responds by allocating and managing tasks and internal system resources as a service to users and programs of the
..... Click the link for more information.
Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification.
..... Click the link for more information.
computer is a machine which manipulates data according to a list of instructions.

Computers take numerous physical forms. The first devices that resemble modern computers date to the mid-20th century (around 1940 - 1941), although the computer concept and various machines
..... Click the link for more information.
Microsoft Windows

Screenshot of Windows Vista Ultimate, the latest version of Microsoft Windows.
Company/developer: Microsoft Corporation
OS family: MS-DOS/9x-based, Windows CE, Windows NT
Source model: Closed source

..... Click the link for more information.
COMMAND.COM is the filename of the default operating system shell (or command line interpreter) for DOS and 16/32bits versions of Windows (95/98/98 SE/Me). It also has an additional role, as the first program run after boot, hence being responsible for setting up the system by
..... Click the link for more information.
cmd.exe is the command line interpreter on OS/2, Windows CE and on Windows NT-based systems (including Windows 2000, XP, Vista, and Server 2003). It is the analog of COMMAND.COM in MS-DOS and Windows 9x systems, or of the shells used on Unix systems.
..... Click the link for more information.
Windows NT

Company/developer: Microsoft
Source model: Closed source / Shared source
Stable release: +/-
Preview release:
..... Click the link for more information.
In computing, a shell is a piece of software that provides an interface for users. Typically, the term refers to an operating system shell which provides access to the services of a kernel.
..... Click the link for more information.
An operating system (OS) is the software that manages the sharing of the resources of a computer. An operating system processes system data and user input, and responds by allocating and managing tasks and internal system resources as a service to users and programs of the
..... Click the link for more information.
kernel is the central component of most computer operating systems (OS). Its responsibilities include managing the system's resources (the communication between hardware and software components).
..... Click the link for more information.
graphical user interface (GUI) is a type of user interface which allows people to interact with a computer and computer-controlled devices which employ graphical icons, visual indicators or special graphical elements called "widgets", along with text, labels or text
..... Click the link for more information.
gnome is a mythical creature characterized by its extremely small size and subterranean free lifestyle.

The word gnome is derived from the New Latin gnomus.
..... Click the link for more information.
Maintainer: The KDE Team

OS: Cross-platform
Available language(s): Multilingual (80 different languages.)
Use: Desktop environment
License: GNU General Public License and others
Website: [1] KDE (
..... Click the link for more information.
The Bourne shell, or sh, was the default Unix shell of Unix Version 7, and replaced the Thompson shell, whose executable file had the same name, sh. It was developed by Stephen Bourne, of AT&T Bell Laboratories, and was released in 1977 in the Version 7 Unix release
..... Click the link for more information.
Berkeley Software Distribution (BSD, sometimes called Berkeley Unix) is the UNIX derivative distributed by the University of California, Berkeley, starting in the 1970s.
..... Click the link for more information.
Linux (pronunciation: IPA: /ˈlɪnʊks/, lin-uks) is a Unix-like computer operating system. Linux is one of the most prominent examples of free software and open source development; its underlying source code can be
..... Click the link for more information.
POSIX (IPA: /ˈpɒsɪks/) or "Portable Operating System Interface" [1] is the collective name of a family of related standards specified by the IEEE to define the application programming interface (API) for
..... Click the link for more information.
The Korn shell (ksh) is a Unix shell which was developed by David Korn (AT&T Bell Laboratories) in the early 1980s. It is backwards compatible with the Bourne shell and includes many features of the C shell as well, such as a command history, which was inspired by the
..... Click the link for more information.
Scripting redirects here. For other uses, see script.


Scripting languages (commonly called script languages) are computer programming languages that are typically interpreted and can be typed directly from a keyboard.
..... Click the link for more information.
A windowing system (or window system) is a graphical user interface (GUI) which implements windows as one of its primary metaphors. It is normally one part of a larger desktop environment.
..... Click the link for more information.
MS-DOS (short for Microsoft Disk Operating System) is an operating system commercialized by Microsoft. It was the most commonly used member of the DOS family of operating systems and was the dominant operating system for the PC compatible
..... Click the link for more information.
OS/2 is a computer operating system, initially created by Microsoft and IBM, then later developed by IBM exclusively. The name stands for "Operating System/2," because it was introduced as the preferred operating system for IBM's "Personal System/2 (PS/2)" line of
..... Click the link for more information.
Microsoft Windows

Screenshot of Windows Vista Ultimate, the latest version of Microsoft Windows.
Company/developer: Microsoft Corporation
OS family: MS-DOS/9x-based, Windows CE, Windows NT
Source model: Closed source

..... Click the link for more information.
Microsoft Batch File

File extension: .bat .cmd .btm
Type of format: Scripting In MS-DOS, OS/2, and Windows, a batch file is a text file containing a series of commands intended to be executed by the command interpreter.
..... Click the link for more information.
A filename extension is a suffix to the name of a computer file applied to indicate its type. It is commonly used to infer information about what sort of data might be stored in the file.
..... Click the link for more information.
Windows PowerShell, previously Microsoft Shell or MSH (codenamed Monad) is an extensible command line interface (CLI) shell and scripting language product developed by Microsoft. The product is based on object-oriented programming and version 2.
..... Click the link for more information.
cmd.exe is the command line interpreter on OS/2, Windows CE and on Windows NT-based systems (including Windows 2000, XP, Vista, and Server 2003). It is the analog of COMMAND.COM in MS-DOS and Windows 9x systems, or of the shells used on Unix systems.
..... Click the link for more information.


This article is copied from an article on Wikipedia.org - the free encyclopedia created and edited by online user community. The text was not checked or edited by anyone on our staff. Although the vast majority of the wikipedia encyclopedia articles provide accurate and timely information please do not assume the accuracy of any particular article. This article is distributed under the terms of GNU Free Documentation License.
Herod_Archelaus


page counter