Almquist shell (also known as A Shell, ash and sh) is a lightweight
Unix shell
A Unix shell is a command-line interpreter or shell that provides a command line user interface for Unix-like operating systems. The shell is both an interactive command language and a scripting language, and is used by the operating system t ...
originally written by
Kenneth Almquist in the late 1980s. Initially a clone of the
System V.4 variant of the
Bourne shell
The Bourne shell (sh) is a shell command-line interpreter for computer operating systems.
The Bourne shell was the default shell for Version 7 Unix. Unix-like systems continue to have /bin/sh—which will be the Bourne shell, or a symbolic link ...
, it replaced the original Bourne shell in the
BSD
The Berkeley Software Distribution or Berkeley Standard Distribution (BSD) is a discontinued operating system based on Research Unix, developed and distributed by the Computer Systems Research Group (CSRG) at the University of California, Be ...
versions of Unix released in the early 1990s.
History
ash was first released via a posting to the
Usenet
Usenet () is a worldwide distributed discussion system available on computers. It was developed from the general-purpose Unix-to-Unix Copy (UUCP) dial-up network architecture. Tom Truscott and Jim Ellis conceived the idea in 1979, and it was ...
news group, approved and moderated by
Rich Salz
InterNetNews (INN) is a Usenet news server package, originally released by Rich Salz in 1991, and presented at the Summer 1992 USENIX conference in San Antonio, Texas. It was the first news server with integrated NNTP functionality.
While p ...
on 30 May 1989. It was described as "a reimplementation of the System V shell
ithmost features of that shell, plus some additions".
Fast, small, and virtually compatible with the
POSIX
The Portable Operating System Interface (POSIX) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines both the system- and user-level application programming inte ...
standard's specification of the Unix shell, ash did not provide
line editing or
command history
Command history is a feature in many operating system shells, computer algebra programs, and other software that allows the user to recall, edit and rerun previous commands.
Command line history was added to Unix in Bill Joy
William Nelson ...
mechanisms, because Almquist felt that such functionality should be moved into the
terminal
Terminal may refer to:
Computing Hardware
* Terminal (electronics), a device for joining electrical circuits together
* Terminal (telecommunication), a device communicating over a line
* Computer terminal, a set of primary input and output devic ...
driver. However, current variants support it.
The following is extracted from the ash package information from
Slackware
Slackware is a Linux distribution created by Patrick Volkerding in 1993. Originally based on Softlanding Linux System, Slackware has been the basis for many other Linux distributions, most notably the first versions of SUSE Linux distributio ...
v14:
Myriad forks have been produced from the original ash release.
These derivatives of ash are installed as the default shell (
/bin/sh
) on
FreeBSD
FreeBSD is a free and open-source Unix-like operating system descended from the Berkeley Software Distribution (BSD), which was based on Research Unix. The first version of FreeBSD was released in 1993. In 2005, FreeBSD was the most popular ...
,
NetBSD
NetBSD is a free and open-source Unix operating system based on the Berkeley Software Distribution (BSD). It was the first open-source BSD descendant officially released after 386BSD was forked. It continues to be actively developed and is a ...
,
DragonFly BSD
DragonFly BSD is a free and open-source Unix-like operating system forked from FreeBSD 4.8. Matthew Dillon, an Amiga developer in the late 1980s and early 1990s and FreeBSD developer between 1994 and 2003, began working on DragonFly BSD in ...
,
MINIX, and in some
Linux distribution
A Linux distribution (often abbreviated as distro) is an operating system made from a software collection that includes the Linux kernel and, often, a package management system. Linux users usually obtain their operating system by downloading on ...
s. MINIX 3.2 used the original ash version, whose
test
Test(s), testing, or TEST may refer to:
* Test (assessment), an educational assessment intended to measure the respondents' knowledge or other abilities
Arts and entertainment
* ''Test'' (2013 film), an American film
* ''Test'' (2014 film), ...
feature differed from POSIX. That version of the shell was replaced in MINIX 3.3. Android used ash until
Android 4.0, at which point it switched to
mksh
KornShell (ksh) is a Unix shell which was developed by David Korn at Bell Labs in the early 1980s and announced at USENIX on July 14, 1983. The initial development was based on Bourne shell source code. Other early contributors were Bell ...
.
Dash
In 1997 Herbert Xu ported
ash
from NetBSD to
Debian
Debian (), also known as Debian GNU/Linux, is a Linux distribution composed of free and open-source software, developed by the community-supported Debian Project, which was established by Ian Murdock on August 16, 1993. The first version of De ...
Linux
Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, which i ...
. In September 2002, with release 0.4.1, this port was renamed to Dash (Debian Almquist shell). Xu's main priorities are POSIX conformance and slim implementation.
[
Like its predecessor, Dash implements support for neither ]internationalization and localization
In computing, internationalization and localization ( American) or internationalisation and localisation (British English), often abbreviated i18n and L10n, are means of adapting computer software to different languages, regional peculiarities an ...
nor multi-byte character encoding (both required in POSIX). Line editing and history support based on GNU Readline is optional ().
Adoption in Debian and Ubuntu
Because of its slimness, Ubuntu
Ubuntu ( ) is a Linux distribution based on Debian and composed mostly of free and open-source software. Ubuntu is officially released in three editions: '' Desktop'', '' Server'', and ''Core'' for Internet of things devices and robots. All th ...
decided to adopt Dash as the default /bin/sh
in 2006. The reason for using Dash is faster shell script
A shell script is a computer program designed to be run by a Unix shell, a command-line interpreter. The various dialects of shell scripts are considered to be scripting languages. Typical operations performed by shell scripts include file manip ...
execution, especially during startup of the operating system, compared to previous versions of Debian and Ubuntu that used Bash for this purpose, although Bash is still the default login shell for interactive use. Dash became the default /bin/sh
in Ubuntu
Ubuntu ( ) is a Linux distribution based on Debian and composed mostly of free and open-source software. Ubuntu is officially released in three editions: '' Desktop'', '' Server'', and ''Core'' for Internet of things devices and robots. All th ...
starting with the 6.10 release in October 2006. Dash replaced Bash and became the default /bin/sh
in Debian 6 (Squeeze).
A result of the shift is that many shell script
A shell script is a computer program designed to be run by a Unix shell, a command-line interpreter. The various dialects of shell scripts are considered to be scripting languages. Typical operations performed by shell scripts include file manip ...
s were found making use of Bash-specific functionalities ("bashisms") without properly declaring it in the shebang line. The problem was first spotted in Ubuntu and the Ubuntu maintainers decided to make all the scripts comply with the POSIX
The Portable Operating System Interface (POSIX) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines both the system- and user-level application programming inte ...
standard. The changes were later upstreamed to Debian, which soon adopted Dash as its default too. As a result, all scripts in Debian and Ubuntu are guaranteed to be POSIX-compliant, save for the extensions merged into Dash for convenience (, , ). A similar transition has happened in Slackware Linux, although their version of is only partially based on Dash.[
]
Embedded Linux
Ash (mainly the Dash fork) is also fairly popular in embedded Linux
Operating systems based on the Linux kernel are used in embedded systems such as consumer electronics (eg. set-top boxes, smart TVs and personal video recorders (PVRs)), in-vehicle infotainment (IVI), networking equipment (such as routers, switc ...
systems. Dash version 0.3.8-5 was incorporated into BusyBox
BusyBox is a software suite that provides several Unix utilities in a single executable file. It runs in a variety of POSIX environments such as Linux, Android, and FreeBSD, although many of the tools it provides are designed to work with int ...
, the catch-all executable often employed in this area, and is used in distributions like DSLinux, Alpine Linux
Alpine Linux is a Linux distribution designed to be small, simple and secure. Alpine Linux uses musl, BusyBox and OpenRC instead of the more commonly used glibc, GNU Core Utilities and systemd respectively. , Tiny Core Linux
Tiny Core Linux (TCL) is a minimal Linux kernel based operating system focusing on providing a base system using BusyBox and FLTK. It was developed by Robert Shingledecker, who was previously the lead developer of Damn Small Linux. The distribu ...
and Linux-based router firmware such as OpenWrt
OpenWrt (from ''open wireless router'') is an open-source project for embedded operating systems based on Linux, primarily used on embedded devices to route network traffic. The main components are Linux, util-linux, musl, and BusyBox. A ...
, Tomato
The tomato is the edible berry of the plant ''Solanum lycopersicum'', commonly known as the tomato plant. The species originated in western South America, Mexico, and Central America. The Mexican Nahuatl word gave rise to the Spanish word , ...
and DD-WRT
DD-WRT is Linux-based firmware for wireless routers and Wireless access point, access points. Originally designed for the Linksys WRT54G series, it now runs on a wide variety of models. DD-WRT is one of a handful of List of router firmware proj ...
.
See also
* Comparison of computer shells
A command shell is a command-line interface to interact with and manipulate a computer's operating system.
General characteristics
Interactive features
Background execution
Background execution allows a shell to run a command without u ...
References
External links
*
*
*
*
*
{{Unix shells
1989 software
Cross-platform software
Scripting languages
Text-oriented programming languages
Unix shells