Question 19 of 135 from exam XK0-004: CompTIA Linux+

Question 19 of 135 from exam XK0-004: CompTIA Linux+

Question

A junior Linux administrator is setting up system-wide configuration settings.

The goal is to ensure the PATH environment variable includes the following locations for all users who log into a Linux system:

/asr/local/bin

/asr/local/sbin

The administrator issues the following commands at the terminal:

echo SPATH

cat /etc/profile

Respectively, the output of these commands is as follows:

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

# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))

# and Bourne compatible shells (bash(1), ksh(1), ash(1), «

if [ ‘id -u’ -eq 0 ]; then

PATH="usr/bin:/usr/sbin:/sbin:/bin”

else
PATH="/usr/local/games”
fi

export PATH

Given this output, which of the following would be the BEST action for the administrator to perform to address this issue?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

B.