Linux /bin/bash Shell and Script Tutorial

RSS
FACEBOOK
FACEBOOK
PINTEREST
PINTEREST
LINKEDIN
INSTAGRAM

Linux Bash shell is the most popular shell. /bin/bash is the path and executable of the Bash shell. /bin/bash is a binary which 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 type of scripting language used to write script files. As file extension is just a label for a script file 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 very basic shell which 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 cirppeled down version of the BASH.

Commands

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

OR

BASH Help

BASH Help

 

RSS
FACEBOOK
FACEBOOK
PINTEREST
PINTEREST
LINKEDIN
INSTAGRAM
LEARN MORE  Linux History Command Tutorial with Examples

Leave a Reply

Your email address will not be published. Required fields are marked *

Enjoy this blog? Please spread the word :)