What is the difference between `ash` and `sh` shell on Linux?
15
votes
2
answers
31078
views
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?](https://unix.stackexchange.com/questions/270966/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
or sh
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
.
Asked by questionto42
(587 rep)
Mar 4, 2022, 11:19 AM
Last activity: Jul 5, 2022, 06:53 PM
Last activity: Jul 5, 2022, 06:53 PM