Skip to content
The Chat Archive
gpt-4o-2024-05-13· OpenAI WildChat-4.8M (AI2)

What package makes /lib/modules/* in Debian ?

  1. User

    What package makes /lib/modules/* in Debian ?

  2. Assistant

    In Debian-based systems, the /lib/modules/* directory is typically populated by the Linux kernel packages. When you install or upgrade a kernel package, it places the kernel modules in the appropriate subdirectory under /lib/modules/.

    For example, if you install a kernel package such as linux-image-<version>, it will create a directory named /lib/modules/<kernel-version>/ and populate it with the necessary modules for that specific kernel version.

    You can find the exact package name by listing installed kernel image packages. You can use the following command to do this:

    dpkg -l | grep linux-image
    

    This will list the installed kernel image packages, such as:

    ii  linux-image-5.10.0-19-amd64        5.10.149-2      amd64        Linux 5.10 for 64-bit PCs (signed)
    

    Here, linux-image-5.10.0-19-amd64 is the package that has created and populated the /lib/modules/5.10.0-19-amd64/ directory.

    To summarize, the /lib/modules/<kernel-version>/ directories are created and managed by the corresponding linux-image-<version> packages.