CompTIA Linux+ XK0-006 (V8) Practice Question

A Linux administrator has placed a new set of custom scripts in the /usr/local/sbin directory and made them executable. When the administrator tries to run a script by typing only its name, the shell returns a "command not found" error. The output of echo $PATH is as follows:

/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

Which of the following commands must the administrator run to allow the scripts in /usr/local/sbin to be executed by name for the duration of the current session?

  • export PATH=$PATH:/usr/local/sbin

  • export PATH="/usr/local/sbin"

  • chmod +x /usr/local/sbin/*

  • source /usr/local/sbin

CompTIA Linux+ XK0-006 (V8)
System Management
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot