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.
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)- A88% (22)
- C4% (1)
- D8% (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.
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.
dmesg outputs kernel ring buffer messages related to hardware detection and boot events, not a structured list of currently loaded kernel modules.
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.
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
Community Discussion
No community discussion yet for this question.