modprobe command is used to load (or remove) modules from the kernel, and I’m wondering if it shouldn’t be
insmod to load them. Then I looked them up and they are different, although both can be used to load modules to and from the intranet.
insmod: specifies which module is which, does not load dependent modules
modprobe: specifies which module to load, not only that module, but also other dependent modules automatically.
modprobe makes an error during loading, it unloads the entire group of modules.
modprobe looks for modules at
/lib/modules/<uname -r>, but does not load the exclusions configured in
Of course, the
modprobe dependency analysis is not done in a vacuum, but is generated by
- Kernel Module Related Commands
lsmod: displays status information about modules that have been loaded into the kernel.
rmmod: removal of the specified module from the kernel (modprobe is also a counterpart to insmod).
dmesg: View error logs during loading or unloading.
bmodinfo: displays detailed information about a given module.
ldconfig is used to find a DLL in a specified location and load it into system memory (kernel space or user space?). (No deeper). So, this command is usually run at system startup, so that after we upgrade or compile the new DLLs ourselves, we need to run
ldconfig manually to get the new DLLs to take effect.
ldconfig finds the DLL in the following locations.
- The configuration file
- The environment variable LD_LIBRARY_PATH corresponds to the directory.
ldconfigstores the records of the loaded DLLs in a file located at:
ldconfigdoes has nothing to do with compile time, but everything to do with running the program, so you should add
-Lat compile time, not to confuse it.
- DLL files contain library metadata information, so it is not feasible to impersonate an identified library simply by changing the file name.