• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

modprobe Command Examples in Linux

by admin

The modprobe command is used to add or remove modules from a kernel. This command is capable of loading all the dependent modules before inserting the specified module. It is therefore preferred over using the insmod and rmmod commands.

To add modules using modprobe, use the -a option and specify the modules you want to add. To unload a module, use the -r option and specify the modules you want to remove.

The syntax of the modprobe command is:

# modprobe [options] [module names]

In addition to options for adding and removing modules, the modprobe command has more options.

Option Description
-f Force the module to be inserted or removed.
-n Conduct a dry run, i.e., output results without actually executing operations.
-s Print errors to the system log (syslog) rather than stderr.
-v Enable verbose mode.

modprobe Command Examples

1. Pretend to load a module into the kernel, but don’t actually do it:

# modprobe --dry-run module_name

2. Load a module into the kernel:

# modprobe module_name

3. Remove a module from the kernel:

# modprobe --remove module_name

4. Remove a module and those that depend on it from the kernel:

# modprobe --remove-dependencies module_name

5. Show a kernel module’s dependencies:

# modprobe --show-depends module_name

Filed Under: Linux

Some more articles you might also be interested in …

  1. jpegtran: command not found
  2. Linux OS service ‘nfs’
  3. CentOS / RHEL 7 : How to change the verbosity of debug logs during booting
  4. rpm: error while loading shared libraries: invalid ELF header
  5. How to Disable IPv6 on Ubuntu 22.04 LTS Jammy Jellyfish
  6. iperf: command not found
  7. How to Add or Remove Ports when firewalld is Disabled
  8. “kernel: INFO: task {PROCESS}:{PID} blocked for more than 120 seconds.” – CentOS/RHEL Troubleshooting
  9. CentOS / RHEL : How to create a Thinly Provisioned Logical Volume
  10. How to set “max_report_luns” and “max_luns” on CentOS/RHEL 6 to scan more than 512 LUNs

You May Also Like

Primary Sidebar

Recent Posts

  • nixos-rebuild Command Examples in Linux
  • nixos-option: Command Examples in Linux
  • nixos-container : Command Examples in Linux
  • nitrogen Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright