A shebang is the character sequence #! at the very top of a script file, followed by the path to the interpreter that should execute the script.

Examples:

  • #!/bin/bash → use Bash shell
  • #!/usr/bin/env python3 → use Python 3 (located via env)
  • #!/bin/sh → use default system shell