Ash (Almquist Shell) Variants
in-ulm.de
in-ulm.de
My question is; To maximize quality of life ... Why not just settle on bash, zsh and fish shell?
When Ubuntu and Debian switched from bash to dash for /bin/sh, the stated motivations were mostly performance (particularly during boot) and size:
https://wiki.ubuntu.com/DashAsBinSh#Why_was_this_change_made...
https://lists.debian.org/debian-release/2007/07/msg00027.htm...
Another reason is size. Ash is smaller than bash, so it's useful on embedded systems, and anything using BusyBox (e.g. Alpine Linux) is going to have ash by default.
1. ash is usually smaller than these, and so works well in distributions aiming for a smaller size.
2. ash has fewer features, but most of those features are the features present in almost all sh variants, so it's a good shell for testing scripts. That is, if the script runs on ash, it will probably run on modern Bash (Linux), old Bash (macOS), and the shells that the ${X}BSD OSes use.
3. I don't really know if this is true, but I assume that as a smaller shell it still works well as a tool for learning about how shells work in general?
Ash is smaller:
- small binary size
- low memory usage
- smaller attack surface
Ash is faster:
- startup time is far lower; this is actually noticeable to me as an end-user.
- better run-time performance
Ash is simpler:
- Ash sticks to POSIX much more closely than other shells and avoids almost any non-POSIX feature; if you're writing portable scripts, Ash is a good shell to test against
- Some non-standard shell features can be footguns; ash lacks these.
- Codebase is simpler to grok, relatively speaking
- See the "Size" section above
It's also easier to build ash as a static binary, which can be useful.
Ash won't replace your interactive shell; it's better for running shell scripts.