thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Systems & Data Center · Foundational

Shebang

The #! line at the top of a script that specifies which interpreter should execute it.

Definition

When an executable script is run, the kernel launches the interpreter named on the shebang line. #!/usr/bin/env python3 locates the interpreter through PATH for portability. The script also needs execute permission.

Example

#!/bin/bash as line one ensures a script runs under Bash even if the user's shell differs.

Exam tip

A script without a shebang or execute permission must be run explicitly, such as bash script.sh.

Related terms