nerdexam
CompTIA

XK0-004 · Question #425

A Linux administrator is confirming information on a system. The administrator issues a series of commands and gets the following output: Which of the following did the administrator issue?

The correct answer is A. Ismod | sort. The lsmod command reads /proc/modules to display all currently loaded kernel modules, and piping to sort organizes the output alphabetically.

System Management

Question

A Linux administrator is confirming information on a system. The administrator issues a series of commands and gets the following output:

Which of the following did the administrator issue?

Options

  • AIsmod | sort
  • Bdmesg | more
  • Cinsmod video > dev/ttyS0
  • Dmodprobe video ismod

How the community answered

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

Why each option

The lsmod command reads /proc/modules to display all currently loaded kernel modules, and piping to sort organizes the output alphabetically.

AIsmod | sortCorrect

lsmod reads /proc/modules and displays all currently loaded kernel modules along with their sizes and reference counts; piping the output to sort arranges the module list alphabetically, producing the sorted columnar output the administrator observed.

Bdmesg | more

dmesg outputs kernel ring buffer messages related to hardware detection and boot events, not a structured list of currently loaded kernel modules.

Cinsmod video > dev/ttyS0

insmod loads a single specified module into the kernel and does not display or enumerate existing loaded modules; redirecting its output to /dev/ttyS0 would send data to a serial port.

Dmodprobe video ismod

modprobe loads a module and its dependencies into the kernel but does not produce a sorted listing of all currently loaded modules.

Concept tested: Listing loaded kernel modules with lsmod

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

Topics

#lsmod#kernel modules#module listing#system commands

Community Discussion

No community discussion yet for this question.

Full XK0-004 Practice