Skip to main content
Linux AdministrationMediumMultiple Choice

Linux Administration Question

Statement

From a Bash shell, which of the following commands directly executes the instruction from the file /usr/local/bin/runme.sh without starting a subshell? (Please select TWO answers.)

#source#dot command#subshell#bash builtin
A

source /usr/local/bin/runme.sh

Correct
B

. /usr/local/bin/runme.sh

Correct
C

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

D

/usr/local/bin/runme.sh

E

run /usr/local/bin/runme.sh

Resolution & Explanations

The source command and its alias, the dot (.), execute a script within the current shell environment. Other methods like calling the script by path or using bash script.sh create a new child process (subshell).