Understanding script interpreters in Linux

Home > Search
  by

When viewing or creating a script, the very first line of the script will be the interpreter the script should use. In this example, the BASH interpreter is being used.

#!/bin/bash

 

Technically speaking, the #! characters are the shebang.

Following is a list of popular script interpreters.

  • #!/bin/sh = Legacy shell
  • #!/bin/bash = Bourne again shell
  • #!/bin/csh = C shell
  • #!/bin/ksh = Korn shell
  • #!/usr/bin/perl = Perl programming language
  • #!/usr/bin/python = Python (.py) programming language 

 

Each script interpreter has its own unique syntax.



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter in the box below so that we can be sure you are a human.




Comments