modinfo(8) on Solnix vs Linux and the BSDs
On Solnix, modinfo is the illumos /usr/sbin/modinfo, which lists the kernel modules currently loaded, with their ID, load address and size. It is not the Linux modinfo: Linux modinfo reads module files, and the closest Linux match for the Solnix command is lsmod.
The manual pages
- Solnix: modinfo(8) from
pkgs.solnix.illumos-world-man· illumos.org - Linux: modinfo(8) kmod-31
- Linux: lsmod(8) kmod-31 (different command, similar job)
- FreeBSD: kldstat(8) 15.1-RELEASE (different command, similar job)
- NetBSD: modstat(8) 11.0 (different command, similar job)
What Solnix runs
A default Solnix system runs the illumos modinfo at /usr/sbin/modinfo. No other variants are shipped. The page's SEE ALSO lists modload(8) and modunload(8) for loading and unloading modules.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| Linux | same name, different job | Solnix modinfo reports on modules loaded in the running kernel. Linux modinfo extracts attributes (author, description, license, parm, depends, alias) from module files given by name or filename. A Linux script that calls modinfo with a module name will not work on Solnix. Source: Solnix modinfo(8) DESCRIPTION; Linux modinfo(8) DESCRIPTION, -F |
| Linux | options | Solnix modinfo accepts only -c, -w and -i module-id. The Linux options -F, -k, -0, -b, -a, -d, -l, -p, -n and -V do not exist on Solnix. Solnix modinfo takes no module name or filename arguments.Source: Solnix modinfo(8) SYNOPSIS, OPTIONS; Linux modinfo(8) SYNOPSIS, OPTIONS |
| Linux | closest Linux match is lsmod | For listing what is loaded, lsmod is the nearer Linux command. The lsmod page says it formats /proc/modules and takes no options. Solnix modinfo has -i to select one module and -c to show instance count and state.Source: Linux lsmod(8) SYNOPSIS, DESCRIPTION; Solnix modinfo(8) -c, -i |
| Linux, FreeBSD, NetBSD | output columns | Solnix prints the fixed columns Id, Loadaddr, Size, Info, Rev and Module Name. Size is in hexadecimal bytes, covering text, data and bss. NetBSD modstat prints CLASS, SOURCE, SIZE, FLAG, REFS and REQUIRES, with SIZE as the text section in bytes. Do not parse the output across systems. Source: Solnix modinfo(8) DESCRIPTION; NetBSD modstat(8) DESCRIPTION; Linux lsmod(8) DESCRIPTION |
| FreeBSD | size format and selecting one entry | FreeBSD kldstat -h shows sizes in human-readable units instead of hex. Solnix modinfo has no such option, and its Size is in hexadecimal bytes. Both have -i, taking a module ID on Solnix and a file ID on FreeBSD. FreeBSD also selects by file name (-n) or module name (-m).Source: FreeBSD kldstat(8) -h, -i, -n, -m; Solnix modinfo(8) -i, DESCRIPTION |
| FreeBSD, NetBSD | selecting by name | FreeBSD kldstat -n filename and -m modname, and NetBSD modstat -n name (or a bare name), select a module by name. Solnix modinfo selects only by numeric ID with -i module-id.Source: FreeBSD kldstat(8) -n, -m; NetBSD modstat(8) SYNOPSIS, -n; Solnix modinfo(8) -i |
| FreeBSD, NetBSD | -c, -w and -k | Solnix -c shows the instance count and state, and -w stops truncation at 80 characters. FreeBSD kldstat and NetBSD modstat have neither. NetBSD -k shows the kernel text address, which Solnix prints by default as Loadaddr.Source: Solnix modinfo(8) -c, -w, DESCRIPTION; FreeBSD kldstat(8) OPTIONS; NetBSD modstat(8) -k |
| FreeBSD, NetBSD | autoload and loadability checks | NetBSD modstat -A, -a and -e report whether modules can be autoloaded or loaded now. FreeBSD kldstat -q quietly checks whether a file is loaded or compiled in. The Solnix page documents no such checks.Source: NetBSD modstat(8) -A, -a, -e; FreeBSD kldstat(8) -q; Solnix modinfo(8) OPTIONS |
| OpenBSD | no OpenBSD counterpart | The bundle includes no OpenBSD page for this command, so no comparison is made. Source: Bundle header (counterparts: linux, freebsd, netbsd only) |
| FreeBSD, NetBSD | exit status | FreeBSD kldstat exits 0 on success and >0 on error. NetBSD modstat exits 0 on success and nonzero on error. The Solnix page has no EXIT STATUS section. Source: FreeBSD kldstat(8) EXIT STATUS; NetBSD modstat(8) EXIT STATUS; Solnix modinfo(8) |
Everyday tasks
| Task | Solnix | Linux | FreeBSD | NetBSD |
|---|---|---|---|---|
| list loaded kernel modules | modinfo | lsmod | kldstat | modstat |
| show one loaded module | modinfo -i module-id | — | kldstat -i id (or -n filename, -m modname) | modstat -n name |
| show module state and instance count | modinfo -c | — | — | modstat |
| show module file attributes (author, license, parameters) | — | modinfo -F field module | — | — |
| show module load address | modinfo (Loadaddr column) | — | — | modstat -k |
Standards
- POSIX: modinfo is not a POSIX.1-2024 utility.
- Solnix: Interface Stability: Evolving.
Writing portable scripts
- Do not call modinfo in a cross-platform script. Its meaning differs between Linux and Solnix. Branch on the tool that is present: lsmod, kldstat, modstat or modinfo.
- Treat the output as human-readable only. Columns, size units and selection options differ between all of these tools.
Every difference here is taken from the manual pages linked above: Solnix's published page, Linux (man-pages and the GNU and util-linux manuals), FreeBSD, OpenBSD and NetBSD. Each row names its source. Where a manual is silent, this page is too. Compiled 2026-10-26. Found a mistake? Mail hackers@lists.solnix.io.