LinuxCommandLibrary

modutil

Manage NSS module databases

TLDR

Add a PKCS #11 module to a NSS database (e.g. a Firefox profile: $HOME/.mozilla/firefox/default-release)

$ modutil -dbdir sql:[path/to/nss/db/dir] -add "[module_label]" -libfile [path/to/pkcs11_mod.so]
copy

List PKCS #11 modules in a NSS database
$ modutil -dbdir sql:[path/to/nss/db/dir] -list
copy

SYNOPSIS

modinfo [options] module_name | filename

Note: Direct execution of 'modutil' is uncommon; its functionality is typically provided by tools like 'modinfo' from the kmod suite.

PARAMETERS

-F field, --field=field
    Display only the value of the specified field for the module (e.g., `license`, `author`, `description`, `filename`).

-k kernel_version, --kernel=kernel_version
    Specify the kernel version for which to get module information, rather than the running kernel.

-n, --null
    Use null characters to separate fields instead of newlines, useful for scripting output parsing.

-a, --author
    Equivalent to `-F author`: Show the author of the module.

-d, --description
    Equivalent to `-F description`: Show the description of the module.

-l, --license
    Equivalent to `-F license`: Show the license of the module.

-p, --parameters
    Equivalent to `-F parm`: Show the module parameters, their types, and descriptions.

-s, --summary
    Show a summary of common module information including author, description, license, dependencies, and parameters.

-V, --version
    Print the version of the utility and exit.

-h, --help
    Display a help message and exit.

DESCRIPTION

The `modutil` command is not a standalone executable on most modern Linux distributions. Historically, or in some specific contexts, `modutil` referred to a collection of utilities for kernel module operations, such as extracting module information or verifying module signatures. These functionalities are now primarily provided by the `kmod` package, which replaced the older `module-init-tools`. The most common functionality associated with `modutil`—dumping module metadata—is now performed by the `modinfo` command, a core part of the `kmod` suite. `modutil` may appear in older documentation or be used internally by certain scripts, but for general user interaction, `modinfo`, `lsmod`, `insmod`, `rmmod`, and `modprobe` are the primary commands to interact with kernel modules.

CAVEATS

The `modutil` command is not typically available as a direct executable on most modern Linux systems. Its functions are absorbed into the `kmod` suite of utilities, particularly `modinfo`, `lsmod`, etc. Direct references to `modutil` are often found in older documentation, specific embedded systems, or internal scripts, and should generally be substituted with the appropriate `kmod` command for current systems.

COMMON USE CASES (VIA MODINFO)

While `modutil` itself is rare, its functionalities are commonly accessed through `modinfo`. Here are some typical ways its successor, `modinfo`, is used:

Getting Comprehensive Module Information:
modinfo usb_storage
This command displays comprehensive information about the `usb_storage` kernel module, including its filename, license, author, description, dependencies, and parameters.

Querying Specific Fields:
modinfo -F license ath9k
Retrieves only the license information for the `ath9k` wireless driver module.

Checking Module Parameters:
modinfo -p nouveau
Lists all available parameters for the `nouveau` graphics driver module, along with their types and brief descriptions.

HISTORY

`modutil`'s historical roots are tied to the `module-init-tools` package, which was the standard set of utilities for managing kernel modules on Linux systems. Over time, `module-init-tools` was largely replaced by the `kmod` project. `kmod` provides a more unified and robust framework for module management, consolidating various functionalities into its own set of subcommands and standalone utilities (like `modinfo`). Consequently, the standalone `modutil` command either ceased to exist as a direct executable or its functions were fully integrated into the `kmod` toolchain, making direct invocation unnecessary or deprecated for most users.

SEE ALSO

modinfo(8), lsmod(8), insmod(8), rmmod(8), modprobe(8), depmod(8), kmod(8)

Copied to clipboard