nerdexam
CompTIA

220-1002 · Question #801

Joe, a technician, is using a terminal session on a Linux desktop. He is trying to install a software update but receives an error message stating he does not have the required privileges. Which of…

The correct answer is D. sudo. The sudo command in Linux allows a permitted user to execute a command with elevated (superuser) privileges to overcome permission errors.

Hardware and network troubleshooting

Question

Joe, a technician, is using a terminal session on a Linux desktop. He is trying to install a software update but receives an error message stating he does not have the required privileges. Which of the following commands should Joe use to accomplish this task?

Options

  • Apwd
  • Bapt-get
  • Cchmod
  • Dsudo

How the community answered

(25 responses)
  • A
    8% (2)
  • B
    4% (1)
  • D
    88% (22)

Why each option

The sudo command in Linux allows a permitted user to execute a command with elevated (superuser) privileges to overcome permission errors.

Apwd

pwd (print working directory) displays the current directory path and has no effect on user privileges.

Bapt-get

apt-get is the package management command used for installation, but it does not grant privileges - it still requires sudo to run with the necessary permissions.

Cchmod

chmod modifies file or directory permissions, not the current user's privileges for executing a command.

DsudoCorrect

sudo (superuser do) temporarily grants root-level privileges to the invoking user for a single command, which is the correct way to run privileged operations like software installation in Linux. Prepending sudo to the apt-get command would resolve the privileges error without requiring a full root login.

Concept tested: Linux privilege escalation with sudo command

Source: https://man7.org/linux/man-pages/man8/sudo.8.html

Topics

#sudo#Linux CLI#privilege escalation#terminal commands

Community Discussion

No community discussion yet for this question.

Full 220-1002 Practice