Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Almquist shell
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Lightweight Unix shell}} {{Infobox software | name = Almquist shell | logo = | screenshot = | caption = | developer = Kenneth Almquist | released = {{Start date and age|1989|05|30}} | latest release version = | latest release date = | programming language = [[C (programming language)|C]] | operating system = [[Unix-like]] | platform = [[Cross-platform]] | genre = [[Unix shell]] | license = | website = }} '''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 [[SVR4|System V.4]] variant of the [[Bourne shell]], it replaced the original Bourne shell in the [[Berkeley Software Distribution|BSD]] versions of Unix released in the early 1990s. ==History== ash was first released via a posting to the {{mono|[[comp.* hierarchy|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".<ref>{{Cite web| title=v19i001: A reimplementation of the System V shell, Part01/08 | url=https://groups.google.com/d/topic/comp.sources.unix/A6cnyKX-Gq4/discussion | date=May 30, 1989 | editor=Rich Salz | editor-link=Rich Salz | author=Almquist, Kenneth | publisher=[[Usenet]] newsgroup, comp.sources.unix}}</ref> Fast, small, and virtually compatible{{citation needed|date=February 2016}} with the [[POSIX]] standard's specification of the Unix shell, ash did not provide [[Line editor|line editing]] or [[command history]] mechanisms, because Almquist felt that such functionality should be moved into the [[Computer terminal|terminal]] [[Device driver|driver]]. However, modern variants support it. The following is extracted from the ash package information from [[Slackware]] v14: {{Blockquote|<p>ash (Kenneth Almquist's ash shell)</p><p>A lightweight (92K) Bourne compatible shell. Great for machines with low memory, but does not provide all the extras of shells like [[Bash (Unix shell)|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.</p>}} Myriad forks have been produced from the original ash release.<ref name=vars>{{cite web |last1=Mascheck |first1=Sven |title=Ash (Almquist Shell) Variants |url=https://www.in-ulm.de/~mascheck/various/ash/ |website=www.in-ulm.de}}</ref> These derivatives of ash are installed as the default shell (<code>/bin/sh</code>) on [[FreeBSD]], [[NetBSD]], [[DragonFly BSD]], [[MINIX]], and in some [[Linux distribution]]s. MINIX 3.2 used the original ash version, whose [[test (Unix)|test]] feature differed from POSIX.<ref>{{cite web |url=https://invisible-island.net/autoconf/portability-test.html |title=TEST versus Portability |author=Thomas E. Dickey |year=2015 |access-date=March 1, 2020}}</ref> That version of the shell was replaced in MINIX 3.3. Android used ash until [[Android Ice Cream Sandwich|Android 4.0]], at which point it switched to [[KornShell|mksh]].<ref>{{cite web | url=https://android.googlesource.com/platform/system/core/+/master/shell_and_utilities/README.md | title=Android's shell and utilities | author=Elliott Hughes | date=2018-06-20 | access-date=2020-02-29}}</ref> =={{anchor|dash}}Dash == {{Infobox software | name = Debian Almquist shell (DASH) | logo = | screenshot = | caption = | developer = Herbert Xu | released = {{Start date and age|1997|07|15}} | latest release version = 0.5.12 | latest release date ={{Start date and age|2022|12|11}} | programming language = [[C (programming language)|C]] | operating system = [[Linux]], [[Android (operating system)|Android]] | platform = | genre = [[Unix shell]] | license = [[BSD licenses|3-clause BSD license]] with mksignames under [[GNU GPL]]<ref>{{cite web |last1=Xu |first1=Herbert |title=COPYING |url=https://git.kernel.org/pub/scm/utils/dash/dash.git/tree/COPYING?h=v0.5.12 |website=The Linux Kernel Archives |access-date=23 December 2023}}</ref> | website = {{URL|gondor.apana.org.au/~herbert/dash/}} | repo = {{URL|git.kernel.org/pub/scm/utils/dash/dash.git}} }} In 1997 Herbert Xu ported <code>ash</code> from NetBSD to [[Debian|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.<ref name=vars/> Like its predecessor, Dash implements support for neither [[internationalization and localization]] nor [[Variable-width encoding|multi-byte character encoding]] (both required in POSIX).{{Citation needed|date=March 2023}} Line editing and history support based on [[GNU Readline]] is optional ({{code|--with-libedit}}). === Adoption in Debian and Ubuntu === {{anchor|Slimness}}Because of its slimness, [[Ubuntu (operating system)|Ubuntu]] decided to adopt Dash as the default <code>/bin/sh</code><ref name="Debian">{{cite web | url=https://wiki.debian.org/Shell | title=Non-interactive Shell | website=[[Debian]] Wiki | date=2020-01-13 | access-date=2020-02-29}}</ref><ref name="Ubuntu">{{cite web | url=https://wiki.ubuntu.com/DashAsBinSh | title=Dash as /bin/sh | website=[[Ubuntu (operating system)|Ubuntu]] Wiki | date=2017-12-16 | access-date=2020-02-29}}</ref> in October 2006 with version 6.10. The reason for using Dash is faster [[shell script]] execution,<ref>{{cite book | author=Neal Krawetz | title=Ubuntu: Powerful Hacks and Customizations | year=2011 | publisher=[[John Wiley & Sons]] | pages=178 | url=https://books.google.com/books?id=h_zclqESvu8C&pg=PT178 | isbn=9781118080382}}</ref> especially during startup of the operating system, compared to previous versions of Debian and Ubuntu that used Bash for this purpose, although [[Bash (Unix shell)|Bash]] is still the default login shell for interactive use.<ref>{{cite book | author1=Christopher Negus | author2=Francois Caen | title=Ubuntu Linux Toolbox | publisher=John Wiley & Sons | year=2011 | url=https://books.google.com/books?id=L_IXUtw_w-AC&pg=PA49 | pages=49 | isbn=9781118079140}}</ref> A result of the shift is that many [[shell script]]s were found making use of [[Bash (Unix shell)|Bash]]-specific functionalities ("bashisms") without properly declaring it in the [[shebang (Unix)|shebang]] line.<ref>{{cite web | url=https://bugs.launchpad.net/ubuntu/+source/dash/+bug/61463 | title=Script that are using bash could be broken with the new symlink | author=Egil Hasting | date=2006-09-20 | publisher=[[Launchpad (website)|Launchpad]] | access-date=2020-02-29}}</ref><ref>{{cite web | url=https://bugs.launchpad.net/ubuntu/+source/dash/+bug/141481 | title=dash as #!/bin/sh introduces countless incompatibilities | author=comotion | date=2007-09-21 | publisher=Launchpad | access-date=2020-02-29}}</ref> 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 {{code|/bin/sh}} too in Debian 6 (Squeeze), released in February 2011.<ref name="Debian"/> 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 ({{code|local}}, {{code|echo -n}}, {{code|test -a / -o}}).<ref name=deb>{{cite web |title=10. Files |url=https://www.debian.org/doc/debian-policy/ch-files.html#scripts |website=Debian Policy Manual v4.5.0.2}}</ref><ref>{{man|1|checkbashisms|ManKier}}</ref> A similar transition has happened in Slackware Linux, although its version of {{code|ash}} is only partially based on Dash.<ref name=vars/> ===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 (Unix shell)|Bash]] features which are enabled in modern distributions like [[Alpine Linux]], [[Tiny Core Linux]] and Linux-based [[Router (computing)|router]] firmware such as [[OpenWrt]], [[Tomato (firmware)|Tomato]] and [[DD-WRT]]. ==See also== * [[Comparison of command shells]] == References == {{Reflist}} ==External links== * {{Official website}} * {{man|1|dash|Linux}} * {{man|1|dash|Debian}} * {{man|1|sh|FreeBSD}} * {{man|1|sh|NetBSD}} {{Unix shells}} [[Category:1989 software]] [[Category:Cross-platform software]] [[Category:Scripting languages]] [[Category:Text-oriented programming languages]] [[Category:Unix shells]]
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Anchor
(
edit
)
Template:Blockquote
(
edit
)
Template:Citation needed
(
edit
)
Template:Cite book
(
edit
)
Template:Cite web
(
edit
)
Template:Code
(
edit
)
Template:Infobox software
(
edit
)
Template:Man
(
edit
)
Template:Mono
(
edit
)
Template:Official website
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:Unix shells
(
edit
)
Search
Search
Editing
Almquist shell
Add topic