312-97 practice question 32 of 35

(William Friedkin has been working as a DevSecOps engineer in an IT company for the past 3 years. His team leader has asked him to validate the host…

Full set: 100 questions
(William Friedkin has been working as a DevSecOps engineer in an IT company for the past 3 years. His team leader has asked him to validate the host configuration that runs the Docker containers and perform security checks at the container level by implementing Docker’s CIS Benchmark Recommendations. Therefore, William would like to integrate Docker Bench with Jenkins to incorporate security testing in DevOps workflow and secure the Docker Container. Before starting the procedure, he would like to install openssh on Ubuntu. Which of the following command should William run to install openssh on Ubuntu?)
Answer options
A: sudo apt-get -s install openssh-server.
B: sudo apt.get install openssh-server.
C: sudo apt-get install openssh-server. Correct answer
D: sudo apt.get -s install openssh-server.
Correct Answer:
C. sudo apt-get install openssh-server.
Explanation

On Debian-based Linux distributions like Ubuntu, the apt-get command is a standard utility for handling packages. To install a new package, the install action is used. The command requires superuser (root) privileges, which are obtained using sudo. Therefore, sudo apt-get install openssh-server is the correct and complete command to download and install the OpenSSH server package and its dependencies from the configured repositories. The other options contain syntactical errors or incorrect flags for the intended action.

Why Incorrect

A. The -s flag is for simulation (dry-run) and will not actually install the package. The trailing period is also syntactically incorrect.
B. apt.get is not a valid command; the correct command is apt-get or apt. The trailing period is also incorrect.
D. This option contains two errors: the invalid command apt.get and the -s flag, which would only simulate the installation.

References

Ubuntu Server Guide, "OpenSSH Server". The official documentation demonstrates the installation of the OpenSSH server package using the command sudo apt install openssh-server or the equivalent sudo apt-get install openssh-server. (Section: Installation).

Debian Administration Handbook, "Chapter 6. Maintenance and Updates: The APT Tools". Section 6.2, "apt-get," details the usage of the command, confirming install as the action for installing packages.

Scroll to Top