Terminal: the so-called command-line interface, also known as the command terminal, the user Input Shell Command window, and the DOS interface in Windows, similar.
Shell : The meaning of "shell" is the interface between the operating system and the user, you can use the shell in the command terminal. The shell translates user input into instructions that the operating system can handle. The shell provides some built-in commands and also supports calling out tools.
Dash: is the default shell in Ubuntu. There are a variety of shells, in addition to supporting the default POSIX standard also support different extension syntax, currently most commonly used is bash, many shell learning tutorials are for bash. In addition to not supporting arrays, Dash doesn't really have much difference with bash. In Ubuntu, you can change the default shell from dash to bash.
Buntu's shell installs dash instead of bash by default.
Run the following command to view the details of SH and confirm which program the shell corresponds to:
$ls-al/bin/sh
Dash is lighter and faster than bash. But bash is more common.
If some commands, scripts, and so on are not always executed properly, it may be the cause of dash.
For example, when compiling the Android source code, if you use dash, it is possible to compile an error, or the compiled system will not start.
The shell can be switched back to bash in the following ways:
$sudo dpkg-reconfigure Dash
Then select No or no, and confirm.
Doing so will reconfigure dash and make it not the default shell tool.
You can also directly modify the/bin/sh link file and assign it to/bin/bash:
$sudo ln-fs/bin/bash/bin/sh
Another workaround is to specify the shell to be used directly in the script file, instead of specifying SH:
For example, use #!/bin/bash or #!/bin/dash instead of #!/bin/sh.
However, this will lose the versatility of the script so that it cannot be executed under a system that does not have the script specified.
Linux--Ubuntu Dash bash