IT lexicon › Infra & Ops › kld (FreeBSD)

kld (FreeBSD)

Infra & Ops På svenska → Updated: 2026-11-08

FreeBSD's dynamic kernel linker, which loads modules into the running kernel and takes them out again.

It shipped with FreeBSD 3.0 in 1998, replacing the older LKM mechanism inherited from earlier BSDs, which required modules to be built in a special way. Under kld a module is an ordinary ELF file ending in .ko under /boot/kernel, and there are three tools to know: kldload, kldunload and kldstat. The boot loader can pull in the same module early with a line like zfs_load="YES" in /boot/loader.conf.

kld is what made it sensible to ship one generic kernel and leave drivers, file systems and even Linux emulation as optional extras. Modules declare dependencies and versions, so the kernel refuses a module built against the wrong ABI instead of crashing on it later.

← Back to the lexicon