{
    "content": [
        {
            "type": "text",
            "text": "# depmod(8) (man)\n\n## TLDR\n\n> Generate `modules.dep` and map files for Linux kernel modules.\n\n- Generate dependency and map files for the current kernel:\n  `depmod`\n- Generate dependency and map files in a specified directory:\n  `depmod {{-o|--outdir}} {{path/to/directory}}`\n- Generate dependency and map files for a specific kernel version:\n  `depmod {{kernel_version}}`\n- Examine a specific module instead of all modules:\n  `depmod {{kernel_version}} /{{path/to/module.ko}}`\n- Use an alternative root filesystem directory:\n  `depmod {{-b|--basedir}} {{path/to/root_directory}}`\n- Write dependency information to `stdout` instead of writing to files:\n  `depmod {{-n|--dry-run}}`\n\n*Source: tldr-pages*\n\n---\n\n**Summary:** depmod - Generate modules.dep and map files.\n\n**Synopsis:** depmod [-b basedir] [-e] [-E Module.symvers] [-F System.map] [-n] [-v] [-A] [-P prefix] [-w]\n[version]\ndepmod [-e] [-E Module.symvers] [-F System.map] [-n] [-v] [-P prefix] [-w] [version]\n[filename...]\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| -a | --all | — | Probe all modules. This option is enabled by default if no file names are given in the command-line. |\n| -A | --quick | — | This option scans to see if any modules are newer than the modules.dep file before any work is done: if not, it silently |\n| -b | --basedir | — | If your modules are not currently in the (normal) directory /lib/modules/version, but in a staging area, you can specify |\n| -C | --config | — | This option overrides the default configuration directory at /etc/depmod.d/. |\n| -e | --errsyms | — | When combined with the -F option, this reports any symbols which a module needs which are not supplied by other modules  |\n| -E | --symvers | — | When combined with the -e option, this reports any symbol versions supplied by modules that do not match with the symbol |\n| -F | --filesyms | — | Supplied with the System.map produced when the kernel was built, this allows the -e option to report unresolved symbols. |\n| -h | --help | — | Print the help message and exit. |\n| -n | --dry-run | — | This sends the resulting modules.dep and the various map files to standard output rather than writing them into the modu |\n| -P | — | — | Some architectures prefix symbols with an extraneous character. This specifies a prefix character (for example '') to ig |\n| -v | --verbose | — | In verbose mode, depmod will print (to stdout) all the symbols each module depends on and the module's file name which p |\n| -V | --version | — | Show version of program and exit. See below for caveats when run on older kernels. |\n| -w | — | — | Warn on duplicate dependencies, aliases, symbol versions, etc. |\n\n## See Also\n\n- depmod.d(5)\n- modprobe(8)\n- modules.dep(5)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (6 lines)\n- **DESCRIPTION** (17 lines)\n- **OPTIONS** (1 lines) — 13 subsections\n  - -a --all (3 lines)\n  - -A --quick (3 lines)\n  - -b --basedir (6 lines)\n  - -C --config (2 lines)\n  - -e --errsyms (6 lines)\n  - -E --symvers (4 lines)\n  - -F --filesyms (3 lines)\n  - -h --help (2 lines)\n  - -n --show --dry-run (3 lines)\n  - -P (3 lines)\n  - -v --verbose (3 lines)\n  - -V --version (2 lines)\n  - -w (2 lines)\n- **COPYRIGHT** (3 lines)\n- **SEE ALSO** (2 lines)\n- **AUTHORS** (12 lines)\n\n## Full Content\n\n### NAME\n\ndepmod - Generate modules.dep and map files.\n\n### SYNOPSIS\n\ndepmod [-b basedir] [-e] [-E Module.symvers] [-F System.map] [-n] [-v] [-A] [-P prefix] [-w]\n[version]\n\ndepmod [-e] [-E Module.symvers] [-F System.map] [-n] [-v] [-P prefix] [-w] [version]\n[filename...]\n\n### DESCRIPTION\n\nLinux kernel modules can provide services (called \"symbols\") for other modules to use (using\none of the EXPORTSYMBOL variants in the code). If a second module uses this symbol, that\nsecond module clearly depends on the first module. These dependencies can get quite complex.\n\ndepmod creates a list of module dependencies by reading each module under\n/lib/modules/version and determining what symbols it exports and what symbols it needs. By\ndefault, this list is written to modules.dep, and a binary hashed version named\nmodules.dep.bin, in the same directory. If filenames are given on the command line, only\nthose modules are examined (which is rarely useful unless all modules are listed).  depmod\nalso creates a list of symbols provided by modules in the file named modules.symbols and its\nbinary hashed version, modules.symbols.bin. Finally, depmod will output a file named\nmodules.devname if modules supply special device names (devname) that should be populated in\n/dev on boot (by a utility such as systemd-tmpfiles).\n\nIf a version is provided, then that kernel version's module directory is used rather than the\ncurrent kernel version (as returned by uname -r).\n\n### OPTIONS\n\n#### -a --all\n\nProbe all modules. This option is enabled by default if no file names are given in the\ncommand-line.\n\n#### -A --quick\n\nThis option scans to see if any modules are newer than the modules.dep file before any\nwork is done: if not, it silently exits rather than regenerating the files.\n\n#### -b --basedir\n\nIf your modules are not currently in the (normal) directory /lib/modules/version, but in\na staging area, you can specify a basedir which is prepended to the directory name. This\nbasedir is stripped from the resulting modules.dep file, so it is ready to be moved into\nthe normal location. Use this option if you are a distribution vendor who needs to\npre-generate the meta-data files rather than running depmod again later.\n\n#### -C --config\n\nThis option overrides the default configuration directory at /etc/depmod.d/.\n\n#### -e --errsyms\n\nWhen combined with the -F option, this reports any symbols which a module needs which are\nnot supplied by other modules or the kernel. Normally, any symbols not provided by\nmodules are assumed to be provided by the kernel (which should be true in a perfect\nworld), but this assumption can break especially when additionally updated third party\ndrivers are not correctly installed or were built incorrectly.\n\n#### -E --symvers\n\nWhen combined with the -e option, this reports any symbol versions supplied by modules\nthat do not match with the symbol versions provided by the kernel in its Module.symvers.\nThis option is mutually incompatible with -F.\n\n#### -F --filesyms\n\nSupplied with the System.map produced when the kernel was built, this allows the -e\noption to report unresolved symbols. This option is mutually incompatible with -E.\n\n#### -h --help\n\nPrint the help message and exit.\n\n#### -n --show --dry-run\n\nThis sends the resulting modules.dep and the various map files to standard output rather\nthan writing them into the module directory.\n\n#### -P\n\nSome architectures prefix symbols with an extraneous character. This specifies a prefix\ncharacter (for example '') to ignore.\n\n#### -v --verbose\n\nIn verbose mode, depmod will print (to stdout) all the symbols each module depends on and\nthe module's file name which provides that symbol.\n\n#### -V --version\n\nShow version of program and exit. See below for caveats when run on older kernels.\n\n#### -w\n\nWarn on duplicate dependencies, aliases, symbol versions, etc.\n\n### COPYRIGHT\n\nThis manual page originally Copyright 2002, Rusty Russell, IBM Corporation. Portions\nCopyright Jon Masters, and others.\n\n### SEE ALSO\n\ndepmod.d(5), modprobe(8), modules.dep(5)\n\n### AUTHORS\n\nJon Masters <jcm@jonmasters.org>\nDeveloper\n\nRobby Workman <rworkman@slackware.com>\nDeveloper\n\nLucas De Marchi <lucas.de.marchi@gmail.com>\nDeveloper\n\n\n\nkmod                                         04/30/2026                                    DEPMOD(8)\n\n"
        }
    ],
    "structuredContent": {
        "command": "depmod",
        "section": "8",
        "mode": "man",
        "summary": "depmod - Generate modules.dep and map files.",
        "synopsis": "depmod [-b basedir] [-e] [-E Module.symvers] [-F System.map] [-n] [-v] [-A] [-P prefix] [-w]\n[version]\ndepmod [-e] [-E Module.symvers] [-F System.map] [-n] [-v] [-P prefix] [-w] [version]\n[filename...]",
        "tldr_summary": "Generate `modules.dep` and map files for Linux kernel modules.",
        "tldr_examples": [
            {
                "description": "Generate dependency and map files for the current kernel",
                "command": "depmod"
            },
            {
                "description": "Generate dependency and map files in a specified directory",
                "command": "depmod {{-o|--outdir}} {{path/to/directory}}"
            },
            {
                "description": "Generate dependency and map files for a specific kernel version",
                "command": "depmod {{kernel_version}}"
            },
            {
                "description": "Examine a specific module instead of all modules",
                "command": "depmod {{kernel_version}} /{{path/to/module.ko}}"
            },
            {
                "description": "Use an alternative root filesystem directory",
                "command": "depmod {{-b|--basedir}} {{path/to/root_directory}}"
            },
            {
                "description": "Write dependency information to `stdout` instead of writing to files",
                "command": "depmod {{-n|--dry-run}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-a",
                "long": "--all",
                "arg": null,
                "description": "Probe all modules. This option is enabled by default if no file names are given in the command-line."
            },
            {
                "flag": "-A",
                "long": "--quick",
                "arg": null,
                "description": "This option scans to see if any modules are newer than the modules.dep file before any work is done: if not, it silently exits rather than regenerating the files."
            },
            {
                "flag": "-b",
                "long": "--basedir",
                "arg": null,
                "description": "If your modules are not currently in the (normal) directory /lib/modules/version, but in a staging area, you can specify a basedir which is prepended to the directory name. This basedir is stripped from the resulting modules.dep file, so it is ready to be moved into the normal location. Use this option if you are a distribution vendor who needs to pre-generate the meta-data files rather than running depmod again later."
            },
            {
                "flag": "-C",
                "long": "--config",
                "arg": null,
                "description": "This option overrides the default configuration directory at /etc/depmod.d/."
            },
            {
                "flag": "-e",
                "long": "--errsyms",
                "arg": null,
                "description": "When combined with the -F option, this reports any symbols which a module needs which are not supplied by other modules or the kernel. Normally, any symbols not provided by modules are assumed to be provided by the kernel (which should be true in a perfect world), but this assumption can break especially when additionally updated third party drivers are not correctly installed or were built incorrectly."
            },
            {
                "flag": "-E",
                "long": "--symvers",
                "arg": null,
                "description": "When combined with the -e option, this reports any symbol versions supplied by modules that do not match with the symbol versions provided by the kernel in its Module.symvers. This option is mutually incompatible with -F."
            },
            {
                "flag": "-F",
                "long": "--filesyms",
                "arg": null,
                "description": "Supplied with the System.map produced when the kernel was built, this allows the -e option to report unresolved symbols. This option is mutually incompatible with -E."
            },
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": "Print the help message and exit."
            },
            {
                "flag": "-n",
                "long": "--dry-run",
                "arg": null,
                "description": "This sends the resulting modules.dep and the various map files to standard output rather than writing them into the module directory."
            },
            {
                "flag": "-P",
                "long": null,
                "arg": null,
                "description": "Some architectures prefix symbols with an extraneous character. This specifies a prefix character (for example '') to ignore."
            },
            {
                "flag": "-v",
                "long": "--verbose",
                "arg": null,
                "description": "In verbose mode, depmod will print (to stdout) all the symbols each module depends on and the module's file name which provides that symbol."
            },
            {
                "flag": "-V",
                "long": "--version",
                "arg": null,
                "description": "Show version of program and exit. See below for caveats when run on older kernels."
            },
            {
                "flag": "-w",
                "long": null,
                "arg": null,
                "description": "Warn on duplicate dependencies, aliases, symbol versions, etc."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "depmod.d",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/depmod.d/5/json"
            },
            {
                "name": "modprobe",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/modprobe/8/json"
            },
            {
                "name": "modules.dep",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/modules.dep/5/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 17,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-a --all",
                        "lines": 3,
                        "flag": "-a",
                        "long": "--all"
                    },
                    {
                        "name": "-A --quick",
                        "lines": 3,
                        "flag": "-A",
                        "long": "--quick"
                    },
                    {
                        "name": "-b --basedir",
                        "lines": 6,
                        "flag": "-b",
                        "long": "--basedir"
                    },
                    {
                        "name": "-C --config",
                        "lines": 2,
                        "flag": "-C",
                        "long": "--config"
                    },
                    {
                        "name": "-e --errsyms",
                        "lines": 6,
                        "flag": "-e",
                        "long": "--errsyms"
                    },
                    {
                        "name": "-E --symvers",
                        "lines": 4,
                        "flag": "-E",
                        "long": "--symvers"
                    },
                    {
                        "name": "-F --filesyms",
                        "lines": 3,
                        "flag": "-F",
                        "long": "--filesyms"
                    },
                    {
                        "name": "-h --help",
                        "lines": 2,
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-n --show --dry-run",
                        "lines": 3,
                        "flag": "-n",
                        "long": "--dry-run"
                    },
                    {
                        "name": "-P",
                        "lines": 3,
                        "flag": "-P"
                    },
                    {
                        "name": "-v --verbose",
                        "lines": 3,
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "-V --version",
                        "lines": 2,
                        "flag": "-V",
                        "long": "--version"
                    },
                    {
                        "name": "-w",
                        "lines": 2,
                        "flag": "-w"
                    }
                ]
            },
            {
                "name": "COPYRIGHT",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 12,
                "subsections": []
            }
        ]
    }
}