nerdexam
Linux_Foundation

LFCS · Question #788

All of the following commands will execute the bash script /usr/local/bin/runme.sh EXCEPT:

The correct answer is E. run /usr/local/bin/runme.sh. The run command is not a standard Linux utility for executing scripts; all other options are valid ways to run a bash script.

Submitted by devops_kid· Apr 18, 2026Essential Commands

Question

All of the following commands will execute the bash script /usr/local/bin/runme.sh EXCEPT:

Options

  • Asource /usr/local/bin/runme.sh
  • B. /usr/local/bin/runme.sh
  • C/bin/bash /usr/local/bin/runme.sh
  • D/usr/local/bin/runme.sh
  • Erun /usr/local/bin/runme.sh

How the community answered

(28 responses)
  • B
    4% (1)
  • D
    7% (2)
  • E
    89% (25)

Why each option

The `run` command is not a standard Linux utility for executing scripts; all other options are valid ways to run a bash script.

Asource /usr/local/bin/runme.sh

`source /usr/local/bin/runme.sh` executes the script in the current shell environment.

B. /usr/local/bin/runme.sh

`. /usr/local/bin/runme.sh` is an alias for `source` and also executes the script within the current shell.

C/bin/bash /usr/local/bin/runme.sh

`/bin/bash /usr/local/bin/runme.sh` explicitly invokes the bash interpreter to run the script.

D/usr/local/bin/runme.sh

`/usr/local/bin/runme.sh` executes the script directly, provided it has execute permissions and a valid shebang line.

Erun /usr/local/bin/runme.shCorrect

`run` is not a standard Linux command or shell built-in for script execution and would typically result in a 'command not found' error.

Concept tested: Linux script execution methods

Source: https://man7.org/linux/man-pages/man1/bash.1.html

Topics

#shell scripting#command execution#bash#source command

Community Discussion

No community discussion yet for this question.

Full LFCS Practice