CompTIA Linux+ XK0-006 (V8) Practice Question

After using the command su (without any option) on a Debian 12 server, a junior administrator tries to run several system utilities:

# ifconfig
bash: ifconfig: command not found
# reboot
bash: reboot: command not found
# echo $PATH
/usr/local/bin:/usr/bin:/bin

A quick check shows that /usr/sbin/ifconfig and /sbin/reboot are present on the filesystem. Which action will most quickly restore access to these commands for the current root session and prevent the PATH problem from recurring when switching users in the future?

  • Append /usr/local/sbin to PATH in /etc/profile and reload the file with source /etc/profile.

  • Run chmod 755 /usr/sbin/ifconfig and chmod 755 /sbin/reboot to make the utilities executable.

  • Exit the current shell and re-enter the root account with su - so the full login environment (including /usr/sbin and /sbin) is loaded.

  • Execute ldconfig to rebuild the shared-library cache used by binaries in /usr/sbin and /sbin.

CompTIA Linux+ XK0-006 (V8)
Troubleshooting
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