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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • 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. laptop-detect: command not found
  2. What is kexec_load in RHEL
  3. i3 Command Examples in Linux
  4. chacl Command Examples in Linux
  5. How to Disable/Enable services in Zimbra Mail Server
  6. fisher: Fisher, a fish-shell plugin manager
  7. 10 Sed (Stream Editor) Command Examples
  8. “git sizer” Command Examples
  9. groupdel: command not found
  10. ipcmk: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright