---
title: Loadable kernel module
slug: loadable-kernel-module
qid: 
snapshot: enwiki-001310102974
content_hash: 
license: CC BY-SA 4.0
source: https://en.wikipedia.org/w/index.php?oldid=1310102974
tags: [125876068, 22901162, 22930695, 23039592, 23207001, 23603337, 24623845, 24745122, 26220375, 38787757, 41697874, 59500466, 63523931, 81199107]
---

# Loadable kernel module

> [!note] Provenance
> Snapshot `enwiki-001310102974` · content root `…`
> Derived from <https://en.wikipedia.org/w/index.php?oldid=1310102974> · Licensed CC BY-SA 4.0

A loadable kernel module (LKM) is an executable library that extends the capabilities of a running kernel, or so-called base kernel, of an operating system. LKMs are typically used to add support for new hardware (as device drivers) and/or filesystems, or for adding system calls. When the functionality provided by an LKM is no longer required, it can be unloaded in order to free memory and other resources. Most current Unix-like systems and Windows support loadable kernel modules but with different names, such as kernel loadable module (kld) in FreeBSD, kernel extension (kext) in macOS (although support for third-party modules is being dropped ), kernel extension module in AIX, dynamically loadable kernel module in HP-UX, kernel-mode driver in Windows NT and downloadable kernel module (DKM) in VxWorks. They are also known as kernel loadable module (KLM), or simply as kernel module (KMOD).

A loadable kernel module (LKM) is an executable library that extends the capabilities of a running kernel, or so-called base kernel, of an operating system. LKMs are typically used to add support for new hardware (as device drivers) and/or filesystems, or for adding system calls. When the functionality provided by an LKM is no longer required, it can be unloaded in order to free memory and other resources. Most current Unix-like systems and Windows support loadable kernel modules but with different names, such as kernel loadable module (kld) in FreeBSD, kernel extension (kext) in macOS (although support for third-party modules is being dropped ), kernel extension module in AIX, dynamically loadable kernel module in HP-UX, kernel-mode driver in Windows NT and downloadable kernel module (DKM) in VxWorks. They are also known as kernel loadable module (KLM), or simply as kernel module (KMOD). MODULE_LICENSE("GPL\0for files in the \"GPL\" directory; for others, only LICENSE file applies"); The string comparison code used by the kernel at the time tried to determine whether the module was GPLed stopped when it reached a null character ( \0 ), so it was fooled into thinking that the module was declaring its license to be just "GPL".
