Linux /bin/bash Shell and Script Tutorial – POFTUT

Linux /bin/bash Shell and Script Tutorial

Linux Bash shell is the most popular shell. /bin/bash is the path and executable of the Bash shell. /bin/bash is a binary that is used in different ways to run and execute commands and scripts.

Script File Interpreter #!/bin/bash

In Linux and opensource world script files are very important. There are different types of scripting languages used to write script files. As file extension is just a label for a script file interpreter line is used to specify the scripting language. #!/bin/bash specifies that current file is a bash script which will be interpreted with the bash or interpreter /bin/bash


# and  ! makes this line special because # is used as comment line in bash. ! is called

Alternative Shells

Bash is very popular shell but there are a lot of alternatives to the Bash. Here is some of them.

  • SH is a very basic shell that provides fundamental features of the Bash.
  • KSH is Korn shell which is similar to the Bash.
  • CSH is mainly designed from C programming language.

Difference Between #!/bin/sh and #!/bin/bash

As stated previously bash binary is stored in the /bin/bash path in general. /bin/sh provides the SH shell which is downgraded with less functional version of the BASH.

Bash Shell Commands

Detailed information can be listed with the man command like below. This provides detailed information about the BASH shell and related commands.

$ man bash


$ man /bin/bash

LEARN MORE  Linux usermod Command Tutorial With Examples

Leave a Comment