1.2K
sh and bash are both Unix shell programs, but there are some differences between them are as follows
| bash | sh |
|---|---|
| Bourne Again SHell | SHell |
| #!/bin/bash | #!/bin/sh |
| Developed by Brain Fox | Developed by Stephen R. Bourne |
| Successor of sh | Predecessor of bash |
| bash is the default SHELL | sh is the not default SHELL |
| supports job controls. | does not support job control. |
| bash is not a valid POSIX shell. | sh is a valid POSIX shell |
| Bash scripting is scripting specifically for Bash | Shell scripting is scripting in any shell |
| supports command history. | does not support command history. |
In summary, sh is the original Unix shell with fewer features, while bash is a more advanced shell that provides additional features and capabilities, and is designed to be a superset of sh.