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.
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)- A8% (2)
- B4% (1)
- D88% (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.
pwd (print working directory) displays the current directory path and has no effect on user privileges.
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.
chmod modifies file or directory permissions, not the current user's privileges for executing a command.
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
Community Discussion
No community discussion yet for this question.