Almquist shell

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Almquist shell
Development status Active
Written in C
Operating system Cross-platform
Platform Cross-platform
Available in English, multilingual (gettext)
Type Unix shell
Website www.in-ulm.de/~mascheck/various/ash/

The 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. Derivative versions of ash are still installed as the default shell (/bin/sh) on FreeBSD, NetBSD, DragonFly BSD, MINIX, and Android,[1] [2] and in some Linux distributions.

Debian and derived Linux distributions such as Ubuntu ship a version of ash, known as dash (Debian Almquist shell), as the default /bin/sh, although Bash is the default login shell for interactive use.[3][4] The reason for using dash is faster shell script execution,[5] especially during startup of the operating system (compared to Linux distributions using Bash for this purpose).

Ash is also fairly popular in embedded Linux systems; its code was incorporated into the BusyBox catch-all executable often employed in this area.

History[edit]

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".[6]

The following is extracted from the ash package information from Slackware:[when?]

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 and Ubuntu uses ash as its /bin/sh.

Fast, small, and virtually compatible with the POSIX standard's specification of the Unix shell, ash did not feature line editing[clarification needed] or command history mechanisms, because Almquist felt that such functionality should be moved into the terminal driver; however, current variants support it.

Ash has since been replaced on both Debian and Ubuntu. Dash became the replacement for ash in Debian and became the default /bin/sh in Debian Squeeze.[7] Dash became the default /bin/sh in Ubuntu starting with the 6.10 release in October 2006.[8] During the transition by Ubuntu, numerous scripts making use of Bash-specific functionality (but not declaring it) were discovered.[9][10]

See also[edit]

References[edit]

  1. ^ "Android sh source". [dead link]
  2. ^ "Android sh source (android-4.4_r1.2 branch)". Retrieved 23 April 2014. 
  3. ^ /usr/share/adduser.conf in Ubuntu package adduser.
  4. ^ Christopher Negus; Francois Caen (2011). Ubuntu Linux Toolbox. John Wiley & Sons. p. 49. 
  5. ^ Neal Krawetz (2011). Ubuntu: Powerful Hacks and Customizations. John Wiley & Sons. p. 178. 
  6. ^ Almquist, Kenneth (May 30, 1989). Rich Salz, ed. "v19i001: A reimplementation of the System V shell, Part01/08". Usenet newsgroup, comp.sources.unix. 
  7. ^ Dash as /bin/sh
  8. ^ Dash as /bin/sh in Ubuntu 6.10
  9. ^ Ubuntu bug #61463: script that are using bash could be broken with the new symlink
  10. ^ Ubuntu bug #141481: dash as #!/bin/sh introduces countless incompatibilities

Further reading[edit]

External links[edit]