A junior Linux systems administrator needs to update system software.
Which of the following shell commands would allow the administrator to gain the necessary permissions to update the software?
Click on the arrows to vote for the correct answer
A. B. C. D.A.
The correct answer is A. sudo.
Explanation: In Linux, sudo (short for "superuser do") is a command that allows a user to execute a command with the privileges of another user, typically the superuser or root user. This allows a regular user to perform administrative tasks without having to log in as the superuser, which can be dangerous if the wrong command is entered.
The sudo command is typically used before other commands to execute them with elevated privileges. For example, if a user wants to update system software, they might enter the following command:
sqlsudo apt-get update
This command would update the package lists using the "apt-get" command with elevated privileges granted by sudo. The user would be prompted for their password, and assuming they have the necessary permissions, the command would be executed.
chmod (B) is a command used to change the permissions of files and directories.
grep (C) is a command used to search for patterns in text files.
pwd (D) is a command used to print the current working directory.
Neither chmod, grep, nor pwd would give the necessary permissions to update system software. Therefore, the correct answer is A. sudo.