DH_INSTALLMODULES(1)

πŸ’– DH_INSTALLMODULES β€” register kernel modules πŸ’–

okay bestie, gather round, because this little icon from the Debhelper family is about to make your kernel modules ✨*official*✨. it's dh_installmodules, and it handles the whole "hey system, pls notice my modules" situation for you. no cap.


🌸 SYNOPSIS 🌸

dh_installmodules [debhelper options] [-n] [--name=name]

πŸ¦‹ DESCRIPTION πŸ¦‹

so dh_installmodules is a debhelper program, and its whole job β€” its entire main character arc β€” is registering kernel modules. πŸ’…

here's the tea: it goes looking for kernel modules in the package build directory, and if it finds any, it will automatically generate preinst, postinst and postrm commands that run depmod and register those modules the moment your package gets installed. it doesn't even need to be asked. so efficient. so slay.

those commands don't just wander in on their own though β€” they get inserted into the maintainer scripts by dh_installdeb(1). teamwork, fr fr. 🫢


πŸŽ€ FILES πŸŽ€

  • debian/package.modprobe β€” this gets installed to usr/lib/modprobe.d/package.conf inside the package build directory. but wait, plot twist: before compat version 14, these files get installed under etc/modprobe.d instead. historical lore, iykyk. πŸ’€

✨ OPTIONS ✨

  • -n, --no-scripts β€” do not modify the preinst/postinst/postrm scripts. hands off, bestie. πŸ™ˆ
  • --name=name β€” when you use this one, dh_installmodules goes looking for and installs files named debian/package.name.modprobe instead of the usual debian/package.modprobe. it's giving custom naming era. πŸ‘‘

⭐ NOTES ⭐

okay this part is important, don't scroll past it: this command is not idempotent. 😭

that means you should call dh_prep(1) between invocations of this command. if you don't? it may cause multiple instances of the same text to be added to your maintainer scripts. like, the same paragraph, over and over. cursed behaviour. so pls, do the dh_prep(1) thing. your maintainer scripts will thank you. 🌈


πŸ’œ SEE ALSO πŸ’œ

also just so you know: this program is a part of debhelper. one big happy family. 🧚


πŸ‘‘ AUTHOR πŸ‘‘

Joey Hess <joeyh@debian.org>


and that's the whole page, bestie!! πŸ’– this was debhelper version 14.5ubuntu1, dated 2026-09-21, and honestly? iconic of it. now go register those modules. periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from