In Ubuntu, sh
or /bin/sh
just points to dash
. sh
is supposed to run default command interpreter, which is dash
for Ubuntu.1 dash
refers to Debian Almquist shell.
A shell is a command line interpreter for the system. There are several other shells like bash
, csh
, zsh
etc. Here is a brief excerpt from man page of dash
:
The shell is a command that reads lines from either a file or the termi‐
nal, interprets them, and generally executes other commands. It is the
program that is running when a user logs into the system (although a user
can select a different shell with the chsh(1) command). The shell imple‐
ments a language that has flow control constructs, a macro facility that
provides a variety of features in addition to data storage, along with
built in history and line editing capabilities. It incorporates many
features to aid interactive use and has the advantage that the interpre‐
tative language is common to both interactive and non-interactive use
(shell scripts). That is, commands can be typed directly to the running
shell or can be put into a file and the file can be executed directly by
the shell.
There are lot of tutorials about Linux shells, you can start with this Wikipedia Article.
Coming to your question, if you write sh file
, dash
executes file
for you.
sh
does in a command that invokes a script. That question is about how a#!
works inside a script file. Totally different.