Almquist shell

Almquist shellError creating thumbnail:

Screenshot of NetBSD `ash` running on openSUSE Tumbleweed

Developer(s)| Kenneth Almquist
Initial release| May 30, 1989; 36 years ago (1989-05-30)
Written in| C
Operating system| Unix-like
Platform| Cross-platform
Type| Unix shell

Almquist shell (also known as A Shell, ash and sh) is a lightweight Unix shell originally written by Kenneth Almquist in the late 1980s. Initially a clone of the System V.4 variant of the Bourne shell, it replaced the original Bourne shell in the BSD versions of Unix released in the early 1990s.

## Contents

* 1 History
* 2 Dash
* 2.1 Adoption in Debian and Ubuntu
* 2.2 Embedded Linux
* 3 See also
* 4 References
* 5 External links

## History

ash was first released via a posting to the comp.sources.unix Usenet news group, approved and moderated by Rich Salz on 30 May 1989. It was described as "a reimplementation of the System V shell [with] most features of that shell, plus some additions".[1]

Fast, small, and virtually compatible with the POSIX standard's specification of the Unix shell, ash did not provide line editing or command history mechanisms, because Almquist felt that such functionality should be moved into the terminal driver. However, modern variants support it.

The following is extracted from the ash package information from Slackware v14:

> ash (Kenneth Almquist's ash shell)

> A lightweight (92K) Bourne compatible shell. Great for machines with low memory, but does not provide all the extras of shells like bash, tcsh, and zsh. Runs most shell scripts compatible with the Bourne shell. Note that under Linux, most scripts seem to use at least some bash-specific syntax. The Slackware setup scripts are a notable exception, since ash is the shell used on the install disks. NetBSD uses ash as its /bin/sh.

Error creating thumbnail: Chimera Linux with FreeBSD `sh`

Myriad forks have been produced from the original ash release.[2] These derivatives of ash are installed as the default shell (`/bin/sh`) on FreeBSD, NetBSD, DragonFly BSD, MINIX, and in some Linux distributions. MINIX 3.2 used the original ash version, whose test feature differed from POSIX.[3] 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.[4] Chimera Linux uses FreeBSD's version of the ash as its default, which is quite unique in the Linux realm.[5]

## Dash

Debian Almquist shell (DASH)Error creating thumbnail:

Screenshot of `dash` running on openSUSE Tumbleweed

Developer(s)| Herbert Xu
Initial release| July 15, 1997; 28 years ago (1997-07-15)
Stable release|

0.5.13.1 / October 13, 2025; 6 months ago (2025-10-13)

Repository| git.kernel.org/pub/scm/utils/dash/dash.git
Written in| C
Operating system| Linux, Android
Type| Unix shell
License| 3-clause BSD license with mksignames under GNU GPL[6]
Website| gondor.apana.org.au/~herbert/dash/

In 1997 Herbert Xu ported `ash` from NetBSD to Debian Linux. 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.[2]

Like its predecessor, Dash implements support for neither internationalization and localization nor multi-byte character encoding (both required in POSIX). Line editing and history support based on GNU Readline is optional (`--with-libedit`).

### Adoption in Debian and Ubuntu

Because of its slimness, Ubuntu decided to adopt Dash as the default `/bin/sh`[7][8] in October 2006 with version 6.10. The reason for using Dash is faster shell script execution,[9] 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.[10]

A result of the shift is that many shell scripts were found making use of Bash-specific functionalities ("bashisms") without properly declaring it in the shebang line.[11][12] The problem was first spotted in Ubuntu and the maintainers decided to make all the scripts comply with the POSIX standard. The changes were later upstreamed to Debian, which eventually adopted Dash as its default `/bin/sh` too in Debian 6 (Squeeze), released in February 2011.[7] As a result, Debian policy was amended to allow script developers to assume a largely POSIX-compliant shell, save for the extensions merged into Dash for convenience (`local`, `echo -n`, `test -a / -o`).[13][14] A similar transition has happened in Slackware Linux, although its version of `ash` is only partially based on Dash.[2]

### Embedded Linux

Ash (mainly the Dash fork) is also fairly popular in embedded Linux systems. Dash version 0.3.8-5 was incorporated into BusyBox, the catch-all executable often employed in this area. Modern BusyBox versions support additional Bash features which are enabled in modern distributions like Alpine Linux, Tiny Core Linux and Linux-based router firmware such as OpenWrt, Tomato and DD-WRT.

## See also

* Comparison of command shells

## References

1. ↑ Almquist, Kenneth (May 30, 1989). "v19i001: A reimplementation of the System V shell, Part01/08". in Rich Salz. Usenet newsgroup, comp.sources.unix. https://groups.google.com/d/topic/comp.sources.unix/A6cnyKX-Gq4/discussion.
2. ↑ 2.0 2.1 2.2 Mascheck, Sven. "Ash (Almquist Shell) Variants". https://www.in-ulm.de/~mascheck/various/ash/.
3. ↑ Thomas E. Dickey (2015). "TEST versus Portability". https://invisible-island.net/autoconf/portability-test.html.
4. ↑ Elliott Hughes (2018-06-20). "Android's shell and utilities". https://android.googlesource.com/platform/system/core/+/master/shell_and_utilities/README.md.
5. ↑ https://github.com/chimera-linux/chimerautils/blob/master/src.freebsd/sh/TOUR
6. ↑ Xu, Herbert. "COPYING". https://git.kernel.org/pub/scm/utils/dash/dash.git/tree/COPYING?h=v0.5.12.
7. ↑ 7.0 7.1 "Non-interactive Shell". 2020-01-13. https://wiki.debian.org/Shell.
8. ↑ "Dash as /bin/sh". 2017-12-16. https://wiki.ubuntu.com/DashAsBinSh.
9. ↑ Neal Krawetz (2011). Ubuntu: Powerful Hacks and Customizations. John Wiley & Sons. pp. 178. ISBN 9781118080382. https://books.google.com/books?id=h_zclqESvu8C&pg=PT178.
10. ↑ Christopher Negus; Francois Caen (2011). Ubuntu Linux Toolbox. John Wiley & Sons. pp. 49. ISBN 9781118079140. https://books.google.com/books?id=L_IXUtw_w-AC&pg=PA49.
11. ↑ Egil Hasting (2006-09-20). "Script that are using bash could be broken with the new symlink". Launchpad. https://bugs.launchpad.net/ubuntu/+source/dash/+bug/61463.
12. ↑ comotion (2007-09-21). "dash as #!/bin/sh introduces countless incompatibilities". Launchpad. https://bugs.launchpad.net/ubuntu/+source/dash/+bug/141481.
13. ↑ "10. Files". https://www.debian.org/doc/debian-policy/ch-files.html#scripts.
14. ↑ `checkbashisms(1)` – Linux General Commands Manual

## External links

* No URL found. Please specify a URL here or add one to Wikidata.
* `dash(1)` – Linux User's Manual – User Commands
* `[[[:Template:Man/Debian]] dash(Template:Man/Debian)]` – Template:Man/Debian
* `sh(1)` – FreeBSD General Commands Manual
* `sh(1)` – NetBSD General Commands Manual

* v
* t
* e

Unix shells

* Almquist
* Bash
* Bourne
* csh
* es
* fish
* Hamilton
* Korn
* PWB
* rc
* sash
* tcsh
* Thompson
* Wish
* Zsh

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Almquist shell. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Software:Almquist_shell&oldid=4216765"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template