What is modprobe in Ubuntu
Rachel Hickman
Published Apr 26, 2026
modprobe utility is used to add loadable modules to the Linux kernel. You can also view and remove modules using modprobe command. Linux maintains /lib/modules/$(uname-r) directory for modules and its configuration files (except /etc/modprobe. … The example in this article are done with using modprobe on Ubuntu.
What is the difference between Insmod and modprobe?
4 Answers. modprobe is the intelligent version of insmod . insmod simply adds a module where modprobe looks for any dependency (if that particular module is dependent on any other module) and loads them.
What does SND Aloop do?
snd-aloop is the kernel module for setting up virtual audio loopback devices. Now in this, whatever audio is played back into hw:2,0,s could be captured from hw:2,1,s and viceversa, s ranging from 0 to 7.
Where is modprobe located?
modprobe looks in the module directory /lib/modules/`uname -r` for all the modules and other files, except for the optional configuration files in the /etc/modprobe.What does Lsmod do in Linux?
The lsmod command is used to display the status of modules in the Linux kernel. It results in a list of loaded modules. lsmod is a trivial program which nicely formats the contents of the /proc/modules , showing what kernel modules are currently loaded.
Where is modprobe in Ubuntu?
modprobe looks in the module directory /lib/modules/`uname -r` for all the modules and other files, except for the optional configuration files in the /etc/modprobe.
How do I turn off modprobe?
You can remove a module from the running kernel with the sudo modprobe -r <module_name> command. You will get a warning if it’s being used and the module will not be unloaded.
What is the advantage of using modprobe over insmod to load a module into the kernel?
The modprobe command offers more features than the more basic insmod and rmmod utilities. modprobe intelligently adds or removes a module from the Linux kernel. Note that for convenience, there is no difference between _ and – in module names (automatic underscore conversion is performed).How do I add modules to modprobe?
- To load a kernel module, run modprobe module_name as root . …
- By default, modprobe attempts to load the module from /lib/modules/kernel_version/kernel/drivers/ . …
- Some modules have dependencies, which are other kernel modules that must be loaded before the module in question can be loaded.
–dry-run –show -nDo not execute insert/remove but print the output. Used for debugging purposes.–version -VShows the modprobe version.
Article first time published onWhat is a .KO file?
Loadable kernel modules (. ko files) are object files that are used to extend the kernel of the Linux Distribution. They are used to provide drivers for new hardware like IoT expansion cards that have not been included in the Linux Distribution.
What is modprobe D?
Files in /etc/modprobe.d/ directory can be used to pass module settings to udev, which will use modprobe to manage the loading of the modules during system boot. Configuration files in this directory can have any name, given that they end with the .conf extension.
WHAT IS modules in Linux?
Linux modules are lumps of code that can be dynamically linked into the kernel at any point after the system has booted. They can be unlinked from the kernel and removed when they are no longer needed. Mostly Linux kernel modules are device drivers, pseudo-device drivers such as network drivers, or file-systems.
What is ETC modprobe conf?
d and /etc/modprobe. conf is simple: one command per line, with blank lines and lines starting with ‘#’ ignored (useful for adding comments). A ‘\’ at the end of a line causes it to continue on the next line, which makes the file a bit neater.
What is ALSA loopback?
The ALSA Loopback sound card is a virtual soundcard that is created once the ALSA kernel module snd-aloop is loaded. This virtual soundcard device, as its name indicates, sends back the output signal of applications using it back to itself, so one has a chance to e.g. record this signal from the same device.
What is ALSA utils?
alsa-utils This package contains the command line utilities for the ALSA project. The package can be compiled only with the installed ALSA driver and the ALSA C library (alsa-lib).
What is cat in shell script?
The cat command is a utility command in Linux. One of its most commonly known usages is to print the content of a file onto the standard output stream. Other than that, the cat command also allows us to write some texts into a file.
How do kernel modules work?
Kernel modules are pieces of code that can be loaded and unloaded into the kernel upon demand. They extend the functionality of the kernel without the need to reboot the system. … To dynamically load or remove a module, it has to be configured as a loadable module in the kernel configuration.
What is udev service?
udev is a replacement for the Device File System (DevFS) starting with the Linux 2.6 kernel series. It allows you to identify devices based on their properties, like vendor ID and device ID, dynamically. udev runs in userspace (as opposed to devfs which was executed in kernel space).
How do I list all modules in Linux?
The easiest way to list modules is with the lsmod command. While this command provides a lot of detail, this is the most user-friendly output. In the output above: “Module” shows the name of each module.
What is Initrd used for?
In Linux systems, initrd (initial ramdisk) is a scheme for loading a temporary root file system into memory, to be used as part of the Linux startup process.
How do you block in Linux?
To blacklist the driver when the root device is mounted, add a blacklist entry in a file under /etc/modprobe. d/ . Boot the system into rescue mode with the command linux rescue rdblacklist= name_of_driver , where name_of_driver is the driver that you need to blacklist. Follow the instructions in Section 19.1.
What is Nvidia modprobe?
The nvidia-modprobe utility is used by user-space NVIDIA driver components to make sure the NVIDIA kernel module is loaded and that the NVIDIA character device files are present. These facilities are normally provided by Linux distribution configuration systems such as udev.
How do I load a .KO file in Linux?
To load a kernel module, we can use the insmod (insert module) command. Here, we have to specify the full path of the module. The command below will insert the speedstep-lib. ko module.
What is ETC modules load?
As far as i understand /etc/modules-load.d is read by systemd to, e.g. , load or blacklist explicitely modules on boot. / etc/modprobe.d is used to define options of modules loaded.
Where do I put kernel modules?
- Edit the /etc/modules file and add the name of the module (without the . ko extension) on its own line. …
- Copy the module to a suitable folder in /lib/modules/`uname -r`/kernel/drivers . …
- Run depmod . …
- At this point, I rebooted and then run lsmod | grep module-name to confirm that the module was loaded at boot.
What is make Modules_install?
The make modules command will just compile the modules, leaving the compiled binaries in the build directory. make modules_install will make sure that there are compiled binaries (and compile the modules, if not) and install the binaries into your kernel’s modules directory.
How do I check what modules are available in Linux?
You need to use lsmod program which show the status of loaded modules in the Linux Kernel. Linux kernel use a term modules for all hardware device drivers. Please note hat lsmod is a trivial program which nicely formats the contents of the /proc/modules , showing what kernel modules are currently loaded.
What are loadable kernel modules explain each module in short and discuss their advantages?
Loadable kernel modules have several advantages over monolithic “blobs” of code in the kernel: * Device drivers don’t have to be hard-coded into the kernel. For example, if a new chip-set comes out that powers many webcams, that kernel module can simply be loaded instead of recompiling the kernel with the new module.
What is the benefit of demand loading modules?
To make it easier for users to load and unload modules, to avoid wasting kernel memory by keeping drivers in core when they are not in use, and to allow the creation of “generic” kernels that can support a wide variety of hardware, Linux offers support for automatic loading and unloading of modules.
What is the difference between kernel drivers and kernel modules?
A kernel module is a bit of compiled code that can be inserted into the kernel at run-time, such as with insmod or modprobe . A driver may be built statically into the kernel file on disk. ³ A driver may also be built as a kernel module so that it can be dynamically loaded later. (And then maybe unloaded.)