nerdexam
CompTIACompTIA

XK0-005 · Question #1357

XK0-005 Question #1357: Real Exam Question with Answer & Explanation

The correct answer is A: cd <source>; sudo ./configure $$ make $$ make install. To compile and install an application from source as an unprivileged user, the configure and make steps can run without root, but the make install step requires elevated privileges.

System Management

Question

An administrator is logged on as an unprivileged user and needs to compile and installed an application from source. Which of the following BEST represents how to complete this task?

Options

  • Acd <source>; sudo ./configure $$ make $$ make install
  • Bcd <source>; ./configure $$ sudo make $$ make install
  • Ccd <source>; ./configure $$ make $$ make install
  • Dcd <source>; ./configure $$ make $$ make install

Explanation

To compile and install an application from source as an unprivileged user, the configure and make steps can run without root, but the make install step requires elevated privileges.

Common mistakes.

  • B. Applying sudo to make is generally unnecessary as compilation usually occurs in user-writable directories, while make install without sudo would fail due to permission errors.
  • C. Running all commands without sudo would cause make install to fail because an unprivileged user lacks the permissions to write to system directories.
  • D. This option is identical to C, and also lacks the necessary sudo for the make install step.

Concept tested. Compiling and installing software from source with permissions

Reference. https://www.gnu.org/software/automake/manual/html_node/Installation.html

Topics

#Software compilation#Package installation#User privileges#sudo command

Community Discussion

No community discussion yet for this question.

Full XK0-005 PracticeBrowse All XK0-005 Questions