nerdexam
Linux_Foundation

LFCS · Question #460

You are looking into a new script you received from your senior administrator. In the very first line you notice a #! followed by a path to a binary. The shell will ...

The correct answer is B. use that binary to interpret the script. The #! (shebang) line at the beginning of a script tells the operating system which interpreter binary to use for executing the script.

Submitted by tyler.j· Apr 18, 2026Operation of Running Systems

Question

You are looking into a new script you received from your senior administrator. In the very first line you notice a #! followed by a path to a binary. The shell will ...

Options

  • Aignore the script
  • Buse that binary to interpret the script
  • Cuse that binary to compile the script
  • Dbe replaced by that binary

How the community answered

(44 responses)
  • A
    2% (1)
  • B
    93% (41)
  • C
    5% (2)

Why each option

The `#!` (shebang) line at the beginning of a script tells the operating system which interpreter binary to use for executing the script.

Aignore the script

The shell does not ignore the script; the shebang line explicitly instructs the kernel on how to execute it.

Buse that binary to interpret the scriptCorrect

The `#!` (shebang) line at the beginning of a script specifies the interpreter program that should be used to execute the script. When the script is run, the operating system's kernel reads this line and invokes the specified binary, passing the script's path as an argument for interpretation.

Cuse that binary to compile the script

The specified binary is used to *interpret* the script, not compile it, unless the binary itself is a compiler, which is not the primary purpose of the shebang.

Dbe replaced by that binary

The shell itself doesn't get replaced; rather, the kernel launches the specified binary as a new process to interpret the script.

Concept tested: Shebang (`#!`) interpreter mechanism

Source: https://www.man7.org/linux/man-pages/man7/exec.7.html

Topics

#Shebang#Script execution#Interpreters#Shell scripting basics

Community Discussion

No community discussion yet for this question.

Full LFCS Practice