I am new to a lot of tools on Linux. A quick search did not help, I only got more about bash
or sh
, and searching for it somehow leans towards bash
in the search results. There are quite a few different shell types out there, I have even seen zsh
, thus I guess they are all forks from sh
.
There is already a question What is the difference between using bash and sh to run a script? that is similar:
- but I could not find out what the "a" stands for in a shell
- and this question is also not just about running a script, but the shell as such - since I can choose to take
ash
orsh
for a docker container at hand.
I remember ash
would be more comfortable though still very slim, and I have forgotten why.
What is the main difference between ash
and sh
? size, handling, ...?
Base image was python:3-alpine
, even the one with the latest tag (2022-07) has both /bin/ash
and /bin/sh
. There should be a reason why the two are there in the alpine image that is made to be the most compact of all.
I call it with docker-compose -f docker-compose-develop.yaml run --rm MY_CONTAINER ash
.
ash
was in some way more comfortable. Your answer is helpful since it might also - on top of my general question - depend on the base image. And you might be right that it will not change anything, but that needs to be checked. I will tell, cannot say when. – questionto42 Mar 04 '22 at 13:32dash
and busybox are based onash
as there have been several strands of shells based on the original Almquist shell with years of independent development done on top. IIRC dash was initially based on a port of NetBSD sh to Linux. You'll find major differences between dash, busybox ash, NetBSD sh, FreeBSD sh all based on ash. – Stéphane Chazelas Mar 04 '22 at 13:46ash
(using the system’s package manager), you’ll getdash
or Busyboxash
. – Stephen Kitt Mar 04 '22 at 13:48sh
andash
behave the same way (for example in Debian, neither support exploring history using cursor keys). – Stephen Kitt Mar 04 '22 at 13:54