Shell (computing)
In computing, a shell is a computer program that exposes an operating system's services to a human user or other programs. In general, operating system shells use either a command-line interface (CLI) or graphical user interface (GUI), depending on a computer's role and particular operation. It is named a shell because it is the outermost layer around the operating system.[1][2]
Overview
Operating systems provide various services to their users, including
Most operating system shells are not direct interfaces to the underlying
In addition to shells running on local systems, there are different ways to make remote systems available to local users; such approaches are usually referred to as remote access or remote administration. Initially available on
Most operating system shells fall into one of two categories – command-line and graphical. Command-line shells provide a command-line interface (CLI) to the operating system, while graphical shells provide a graphical user interface (GUI). Other possibilities, although not so common, include a voice user interface and various implementations of a text-based user interface (TUI) that are not CLI, such as text-based menu systems. The relative merits of CLI- and GUI-based shells are often debated. Many computer users use both depending on the task to be performed.
History
Early interactive systems provided a simple command-line interpreter as part of the resident monitor. This interpreter might be called by different names, such as COMCON
on DEC TOPS-10 systems.[5] The interpreter would execute one of a number of predefined commands, one of which would be to run a user program. Common commands would log the user on and off the system, allocate, free, and manipulate devices and files, and query various pieces of information about the system or a user process.[6]
The purpose of such a procedure is to create a medium of exchange into which one could activate any procedure, as if it were called from the inside of another program. Hereafter, for simplification, we shall refer to that procedure as the "SHELL".
Louis Pouzin, The SHELL: A Global Tool for Calling and Chaining Procedures in the System [7]
In 1964, for the Multics operating system, Louis Pouzin conceived the idea of "using commands somehow like a programming language," and coined the term shell to describe it.[8] In a 1965 document, the shell is defined as "a common procedure called automatically by the supervisor whenever a user types in some message at his console, at a time when he has no other process in active execution under console control. This procedure acts as an interface between console messages and subroutine [in the supervisor]."[9] This system was first implemented by Glenda Schroeder and an unnamed man from General Electric.[10]
Multics also introduced the active function, a key concept in all later shells. This is defined as
a string... which is replaced by a character string return value before the command line containing it is executed. Active functions are often used... to implement command-language macros.[11]
In 1971, Ken Thompson developed the Thompson shell in the first version of Unix. While simpler than the Multics shell, it contained some innovative features, which have been carried forward in modern shells, including the use of < and > for input and output redirection.
The graphical shell first appeared in
Command-line shells
A
Application programs may also implement a command-line interface. For example, in Unix-like systems, the telnet program has a number of commands for controlling a link to a remote computer system. Since the commands to the program are made of the same keystrokes as the data being sent to a remote computer, some means of distinguishing the two are required. An escape sequence can be defined, using either a special local keystroke that is never passed on but always interpreted by the local system. The program becomes modal, switching between interpreting commands from the keyboard or passing keystrokes on as data to be processed.
A feature of many command-line shells is the ability to save sequences of commands for re-use. A data file can contain sequences of commands which the CLI can be made to follow as if typed in by a user. Special features in the CLI may apply when it is carrying out these stored instructions. Such
Several command-line shells, such as Xonsh, Bash (Unix shell), and Z shell, offer command-line completion, enabling the interpreter to expand commands based on a few characters input by the user.[12]
A command-line interpreter may offer a history function, so that the user can recall earlier commands issued to the system and repeat them, possibly with some editing. Since all commands to the operating system had to be typed by the user, short command names and compact systems for representing program options were common. Short names were sometimes hard for a user to recall, and early systems lacked the storage resources to provide a detailed on-line user instruction guide.
Graphical shells
A graphical user interface (GUI) provides means for manipulating programs graphically, by allowing for operations such as opening, closing, moving and resizing windows, as well as switching focus between windows. Graphical shells may be included with desktop environments or come separately, even as a set of loosely coupled utilities.
Most graphical user interfaces develop the metaphor of an "electronic desktop", where data files are represented as if they were paper documents on a desk, and application programs similarly have graphical representations instead of being invoked by command names.
Unix-like systems
Graphical shells typically build on top of a
In the case of macOS, Quartz Compositor acts as the windowing system, and the shell consists of the Finder,[13] the Dock,[13] SystemUIServer,[13] and Mission Control.[14]
Microsoft Windows
Modern versions of the Microsoft Windows operating system use the
Desktop applications are also considered shells, as long as they use a third-party engine. Likewise, many individuals and developers dissatisfied with the interface of Windows Explorer have developed software that either alters the functioning and appearance of the shell or replaces it entirely.
Interoperability programmes and purpose-designed software lets Windows users use equivalents of many of the various Unix-based GUIs discussed below, as well as Macintosh. An equivalent of the OS/2 Presentation Manager for version 3.0 can run some OS/2 programmes under some conditions using the OS/2 environmental subsystem in versions of Windows NT.
Other uses
"Shell" is also used loosely to describe application software that is "built around" a particular component, such as web browsers and email clients, in analogy to the shells found in nature. Indeed, the (command-line) shell encapsulates the operating system kernel. These are also sometimes referred to as "wrappers".[2]
In expert systems, a shell is a piece of software that is an "empty" expert system without the knowledge base for any particular application.[15]
See also
- Comparison of command shells
- Human–computer interaction
- Internet Explorer shell
- Shell account
- Shell builtin
- Superuser
- Unix shell
- Window manager – provides a rudimentary process management interface
- CLI for an interpreted programming language
References
- Economist Group, December 13, 2013,
Mr Pouzin created a program called RUNCOM that helped users automate tedious and repetitive commands. That program, which he described as a "shell" around the computer's whirring innards, gave inspiration—and a name—to an entire class of software tools, called command-line shells, that still lurk below the surface of modern operating systems.
- ^ a b Raymond, Eric S. (ed.). "shell". The Jargon File.
- ^ "Operating system shells". AIX 6.1 Information Center. IBM Corp. Retrieved September 16, 2012.
- ^ Wheeler, Sean (14 October 2018). "Running Remote Commands". Microsoft Docs. Microsoft. Retrieved 30 June 2019.
You can run commands on one or hundreds of computers with a single PowerShell command. Windows PowerShell supports remote computing by using various technologies, including WMI, RPC, and WS-Management.
- ^ Digital Equipment Corporation (Nov 1980). TOPS-10 MONITOR INTERNALS (PDF). pp. CMND-1–CMND-16. Retrieved Mar 29, 2022.
- ^ Digital Equipment Corporation (Aug 1977). DECSystem 10 Operating System Commands Manual (PDF). Retrieved Mar 29, 2022.
- ^ Poizin, Louis. "The SHELL: A Global Tool for Calling and Chaining Procedures in the System" (PDF).
- ^ Pouzin, Louis. "The Origin of the Shell". multicians.org. Retrieved Mar 29, 2022.
- ^ Pouzin, Louis. "The SHELL: A Global Tool for Calling and Chaining Procedures in the System" (PDF). MIT.edi. Retrieved Mar 29, 2022.
- ^ Pouzin, Louis. "The Origin of the Shell". multicians.org. Retrieved Feb 12, 2024.
- ^ Honeywell, inc. (Feb 1983). Multics Common Commands (PDF). pp. 1-1–1-2. Retrieved Mar 29, 2022.
- ^ Xonsh Official Website
- ^ a b c "The Life Cycle of a Daemon". Apple Inc.
- ^ "Restart Mission Control in OS X Lion". OSXDaily. Nov 23, 2011.
- ISBN 978-0-13-147957-9.