nerdexam
CompTIA

XK0-005 · Question #167

A systems administrator notices a large number of autoloaded device modules are no longer needed and decides to do a cleanup of them. Which of the following commands will accomplish this task?

The correct answer is D. modprobe -r. The systems administrator wants to remove unused kernel modules that were autoloaded but are no longer necessary.

System Management

Question

A systems administrator notices a large number of autoloaded device modules are no longer needed and decides to do a cleanup of them. Which of the following commands will accomplish this task?

Options

  • Armmod -c
  • Bdepmod -r
  • Cinsmod -c
  • Dmodprobe -r

How the community answered

(60 responses)
  • A
    2% (1)
  • B
    3% (2)
  • C
    2% (1)
  • D
    93% (56)

Why each option

The systems administrator wants to remove unused kernel modules that were autoloaded but are no longer necessary.

Armmod -c

`rmmod` is used to remove a single module, but the `-c` option is not a standard or recognized flag for this command.

Bdepmod -r

`depmod` is used to generate or verify kernel module dependency information, which is used by `modprobe` and `insmod`, not to remove modules. The `-r` option for `depmod` is typically used to rebuild module dependency files.

Cinsmod -c

`insmod` is used to insert a single module into the Linux kernel, which is the opposite of removing modules. The `-c` option is not a standard or recognized flag for `insmod`.

Dmodprobe -rCorrect

The `modprobe -r` command is used to remove a specified module from the Linux kernel, along with any other modules that depend on it but are no longer used by anything else. This makes it effective for cleaning up autoloaded and currently unused modules.

Concept tested: Removing kernel modules

Source: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/kernel_administration_guide/chap-managing-modules

Topics

#Linux kernel modules#modprobe command#Module management#System administration

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice