Understanding script interpreters in Linux

Home > Search

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.



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.