Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Almquist shell

From Wikipedia, the free encyclopedia
(Redirected fromDash (shell))
Lightweight Unix shell
Almquist shell
Screenshot ofNetBSDash running onopenSUSE Tumbleweed
DeveloperKenneth Almquist
Initial releaseMay 30, 1989; 36 years ago (1989-05-30)
Written inC
Operating systemUnix-like
PlatformCross-platform
TypeUnix shell
Websitewww.in-ulm.de/~mascheck/various/ash/ Edit this on Wikidata

Almquist shell (also known asA Shell,ash andsh) is a lightweightUnix shell originally written byKenneth Almquist in the late 1980s. Initially a clone of theSystem V.4 variant of theBourne shell, it replaced the original Bourne shell in theBSD versions of Unix released in the early 1990s.

History

[edit]

ash was first released via a posting to thecomp.sources.unixUsenet news group, approved and moderated byRich 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[citation needed] with thePOSIX standard's specification of the Unix shell, ash did not provideline editing orcommand history mechanisms, because Almquist felt that such functionality should be moved into theterminaldriver. However, modern variants support it.

The following is extracted from the ash package information fromSlackware 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 likebash,tcsh, andzsh. Runs most shell scripts compatible with the Bourne shell. Note that underLinux, 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.

Screenshot of Chimera Linux with FreeBSD ash, showing the system information and some Unix commands
Chimera Linux with FreeBSDsh

Myriad forks have been produced from the original ash release.[2] These derivatives of ash are installed as the default shell (/bin/sh) onFreeBSD,NetBSD,DragonFly BSD,MINIX, and in someLinux distributions. MINIX 3.2 used the original ash version, whosetest feature differed from POSIX.[3] That version of the shell was replaced in MINIX 3.3. Android used ash untilAndroid 4.0, at which point it switched tomksh.[4]Chimera Linux uses FreeBSD's version of the ash as its default, which is quite unique in the Linux realm.[5]

Dash

[edit]
Debian Almquist shell (DASH)
Screenshot ofdash running onopenSUSE Tumbleweed
DeveloperHerbert Xu
Initial releaseJuly 15, 1997; 28 years ago (1997-07-15)
Stable release
0.5.13.1 / October 13, 2025; 4 months ago (2025-10-13)
Written inC
Operating systemLinux,Android
TypeUnix shell
License3-clause BSD license with mksignames underGNU GPL[6]
Websitegondor.apana.org.au/~herbert/dash/
Repositorygit.kernel.org/pub/scm/utils/dash/dash.git

In 1997 Herbert Xu portedash from NetBSD toDebian Linux. In September 2002, with release 0.4.1, this port was renamed toDash (Debian Almquist shell). Xu's main priorities are POSIX conformance and slim implementation.[2]

Like its predecessor, Dash implements support for neitherinternationalization and localization normulti-byte character encoding (both required in POSIX).[citation needed] Line editing and history support based onGNU Readline is optional (--with-libedit).

Adoption in Debian and Ubuntu

[edit]

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 fastershell script execution,[9] especially during startup of the operating system, compared to previous versions of Debian and Ubuntu that used Bash for this purpose, althoughBash is still the default login shell for interactive use.[10]

A result of the shift is that manyshell scripts were found making use ofBash-specific functionalities ("bashisms") without properly declaring it in theshebang line.[11][12] The problem was first spotted in Ubuntu and the maintainers decided to make all the scripts comply with thePOSIX 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 ofash is only partially based on Dash.[2]

Embedded Linux

[edit]

Ash (mainly the Dash fork) is also fairly popular inembedded Linux systems. Dash version 0.3.8-5 was incorporated intoBusyBox, the catch-all executable often employed in this area. Modern BusyBox versions support additionalBash features which are enabled in modern distributions likeAlpine Linux,Tiny Core Linux and Linux-basedrouter firmware such asOpenWrt,Tomato andDD-WRT.

See also

[edit]

References

[edit]
  1. ^Almquist, Kenneth (May 30, 1989).Rich Salz (ed.)."v19i001: A reimplementation of the System V shell, Part01/08".Usenet newsgroup, comp.sources.unix.
  2. ^abcMascheck, Sven."Ash (Almquist Shell) Variants".www.in-ulm.de.
  3. ^Thomas E. Dickey (2015)."TEST versus Portability". RetrievedMarch 1, 2020.
  4. ^Elliott Hughes (2018-06-20)."Android's shell and utilities". Retrieved2020-02-29.
  5. ^https://github.com/chimera-linux/chimerautils/blob/master/src.freebsd/sh/TOUR
  6. ^Xu, Herbert."COPYING".The Linux Kernel Archives. Retrieved23 December 2023.
  7. ^ab"Non-interactive Shell".Debian Wiki. 2020-01-13. Retrieved2020-02-29.
  8. ^"Dash as /bin/sh".Ubuntu Wiki. 2017-12-16. Retrieved2020-02-29.
  9. ^Neal Krawetz (2011).Ubuntu: Powerful Hacks and Customizations.John Wiley & Sons. p. 178.ISBN 9781118080382.
  10. ^Christopher Negus; Francois Caen (2011).Ubuntu Linux Toolbox. John Wiley & Sons. p. 49.ISBN 9781118079140.
  11. ^Egil Hasting (2006-09-20)."Script that are using bash could be broken with the new symlink".Launchpad. Retrieved2020-02-29.
  12. ^comotion (2007-09-21)."dash as #!/bin/sh introduces countless incompatibilities". Launchpad. Retrieved2020-02-29.
  13. ^"10. Files".Debian Policy Manual v4.5.0.2.
  14. ^checkbashisms(1) – Linux General CommandsManual from ManKier.com

External links

[edit]
Retrieved from "https://en.wikipedia.org/w/index.php?title=Almquist_shell&oldid=1333716870#dash"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp