CompTIA Linux+ XK0-005 (v7) Practice Question

During a code-review meeting, a development team discovers that a helper script named build-report, installed at /opt/tools/build-report, cannot be invoked from arbitrary directories unless the full path is typed. The script already has execute permission and works when run as /opt/tools/build-report. The developer captures the following shell session:

$ ls -l /opt/tools/build-report
-rwxr-xr-x 1 dev dev 2076 Sep 12 14:21 /opt/tools/build-report

$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

The goal is to make the utility callable simply as build-report for the current and future login sessions, without moving the file or requiring elevated privileges. Which change best accomplishes this requirement?

  • Set the SHELL environment variable to /opt/tools to place the directory earlier in the search order

  • Export /opt/tools in LD_LIBRARY_PATH so the dynamic linker locates the script automatically

  • Copy build-report into /usr/local/sbin, which is searched by all regular users by default

  • Append /opt/tools to the PATH variable in the user's login profile and reload the session

CompTIA Linux+ XK0-005 (v7)
Scripting, Containers, and Automation
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.

SAVE $47
$390.00 $343.00
Bash, the Crucial Exams Chat Bot
AI Bot