What is a module in Linux
Joseph Russell
Updated on March 25, 2026
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 a module in Unix?
module is a user interface to the Modules package. The Modules package provides for the dynamic modification of the user’s environment via modulefiles. Each modulefile contains the information needed to configure the shell for an application.
How modules are loaded in Linux?
In Linux, all modules end with the . ko extension, and they are normally loaded automatically as the hardware is detected at system boot. However a system administrator can manage the modules using certain commands.
What does module use do?
Modules provide a way to make new software available a well as providing a mechanism whereby multiple versions of a single package are easily accessible. There are other standalone Linux systems in the school that are not part of the unified configuration and, therefore, this document does not apply to those systems.Why is Linux modular?
A modular kernel allows an administrator to add functionality only when required. Keeping only what is necessary in kernel memory reduces the kernel’s memory footprint and increases its overall performance. Each kernel module contains code to handle some necessary system functionality.
What is the module command?
Basically, the module command modifies your environment so that the path and other variables are set so that you can use a program such as gcc, matlab, or mathematica.
What is module load Linux?
module load [modulefile] Loads module or specifies which dependencies have not been loaded. module unload [modulefile] Unloads specified module from environment.
How do I install a Linux module?
- Download and untar or unzip the module you would like to install.
- cd into the module directory that contains setup.py and run the install: python setup.py install –prefix=~
What is module list?
ModuleList can be indexed like a regular Python list, but modules it contains are properly registered, and will be visible by all Module methods. … Appends modules from a Python iterable to the end of the list.
What does module load mean?a program or combination of programs in a form ready to be loaded into main storage and executed: generally the output from a linkage editor.
Article first time published onHow do I see modules in Linux?
- “Module” shows the name of each module.
- “Size” shows the module size (not how much memory it is using)
- “Used by” shows each module’s usage count and the referring modules.
How do I run a Linux module?
- 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.
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 is OS module?
A module is a separate unit of software or hardware. Typical characteristics of modular components include portability, which allows them to be used in a variety of systems, and interoperability, which allows them to function with the components of other systems.
Is Linux a micro?
In short, if it’s a module in Linux, it’s a service in a microkernel, indicating an isolated process.
Is Linux monolithic or modular?
Different Types of Kernels In general, most kernels fall into one of three types: monolithic, microkernel, and hybrid. Linux is a monolithic kernel while OS X (XNU) and Windows 7 use hybrid kernels.
CAN module not found?
A module not found error can occur for many different reasons: The module you’re trying to import is not installed in your dependencies. The module you’re trying to import is in a different directory. The module you’re trying to import has a different casing.
Where is environment module installed?
The module configuration files live in /etc/environment-modules on newer managed workstation machines and /usr/local/Modules on older ones. Either way, the files are installed from a local Debian package.
What does module unload do?
Modules can be removed using the rmmod command but demand loaded modules are automatically removed from the system by kerneld when they are no longer being used. If I were to load another VFAT file system then the vfat module’s count would become 2. …
What is a shell module?
The shell module takes the command name followed by a list of space-delimited arguments. It is almost exactly like the command module but runs the command through a shell ( /bin/sh ) on the remote node. For Windows targets, use the win_shell module instead.
What is module purge?
When a user loads a module for a specific version of a software package, appropriate changes are made to the user’s environment, such as adding new locations in the *PATH environment variables. … “module purge” command will unload all modules from user’s environment.
What is Python module?
A Python module is a file containing Python definitions and statements. A module can define functions, classes, and variables. A module can also include runnable code. Grouping related code into a module makes the code easier to understand and use. It also makes the code logically organized.
Where are modules installed on Linux?
Modules can usually be installed with the package manager of your Unix system. It it is available by default on most Linux distributions, on OS X and FreeBSD either under the name of modules or environment-modules .
Where do you put modules?
For the most part, modules are just Python scripts that are stored in your Lib or Lib/site-packages folder, or local to the script being run. That’s it. The installation of *most* modules is simply the moving of the module’s files into these directories.
Where is kernel module located in Linux?
Linux. Loadable kernel modules in Linux are loaded (and unloaded) by the modprobe command. They are located in /lib/modules or /usr/lib/modules and have had the extension . ko (“kernel object”) since version 2.6 (previous versions used the .o extension).
What are Redis modules?
Redis modules are dynamic libraries that can be loaded into Redis at startup, or using the MODULE LOAD command. … Modules are designed in order to be loaded into different versions of Redis, so a given module does not need to be designed, or recompiled, in order to run with a specific version of Redis.
How do Linux kernel modules work?
Linux Kernel Modules. 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. … This saves time and prevents the possibility of introducing an error in rebuilding and reinstalling the base kernel.
How do I list a kernel module?
Module Commands insmod – install loadable kernel module. lsmod – list loaded modules. modinfo – display information about a kernel module. modprobe – high level handling of loadable modules.
What is a driver module?
A device driver is a loadable kernel module that manages data transfers between a device and the OS. Loadable modules are loaded at boot time or by request and are unloaded by request. A device driver is a collection of C routines and data structures that can be accessed by other kernel modules.
How do I create a Linux kernel module?
- hello.c C source code. …
- Add following c source code to it: …
- Save the file. …
- Save and close the file.
- Compile hello.c module: …
- Become a root user (use su or sudo) and load the module: …
- Verify that module loaded: …
- See message in /var/log/message file:
What is Insmod in Linux with an example?
insmod command in Linux systems is used to insert modules into the kernel. Linux is an Operating System which allows the user to load kernel modules on run time to extend the kernel functionalities.