modload(8) on Solnix vs Linux and the BSDs
On Solnix, modload is the illumos /usr/sbin/modload, which loads one object file produced by ld -r into the running kernel. Unlike FreeBSD kldload and NetBSD modload, a bare filename is looked up relative to the current directory. Use -p to search the kernel's modpath instead.
The manual pages
- Solnix: modload(8) from
pkgs.solnix.illumos-world-man· illumos.org - Linux: insmod(8) kmod-31 (different command, similar job)
- Linux: modprobe(8) kmod-31 (different command, similar job)
- FreeBSD: kldload(8) 15.1-RELEASE (different command, similar job)
- NetBSD: modload(8) 11.0
What Solnix runs
A default Solnix system runs the illumos modload at /usr/sbin/modload. No other variants are shipped. The page says to use add_drv(8), not modload, to add device drivers. modinfo(8) lists loaded modules and modunload(8) unloads them.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| FreeBSD, NetBSD | bare filename lookup | On Solnix, a filename without a leading / is relative to the current directory unless -p is given. On FreeBSD, a bare filename is only loaded from kern.module_path. On NetBSD, a name with no / is searched for in the default system module areas.Source: Solnix modload(8) DESCRIPTION, -p; FreeBSD kldload(8) DESCRIPTION; NetBSD modload(8) DESCRIPTION |
| Linux | name versus path | Solnix modload takes a file name or path. Linux modprobe takes a module name and searches /lib/modules/`uname -r`. It accepts a path only if a relative one starts with "./". Linux insmod takes a filename.Source: Solnix modload(8) SYNOPSIS; Linux modprobe(8) DESCRIPTION; Linux insmod(8) SYNOPSIS |
| NetBSD | -p meaning | Solnix modload -p makes the kernel's modpath the search path for the module. On NetBSD, -p prints a property list for loading with a module, and no module argument is needed.Source: Solnix modload(8) -p; NetBSD modload(8) SYNOPSIS, -p |
| all four | -e post-load hook | Only Solnix has -e exec_file. After a successful load it runs the script or executable with the decimal module ID as its first argument, followed by one module-specific value. The Linux, FreeBSD and NetBSD pages in the bundle document no such option.Source: Solnix modload(8) -e; Linux modprobe(8) OPTIONS; FreeBSD kldload(8) OPTIONS; NetBSD modload(8) OPTIONS |
| Linux, NetBSD | passing parameters | The Solnix SYNOPSIS has no way to pass parameters to the module. Linux insmod and modprobe accept module options after the name. NetBSD modload passes typed properties with -b, -i and -s.Source: Solnix modload(8) SYNOPSIS; Linux insmod(8) SYNOPSIS; Linux modprobe(8) DESCRIPTION; NetBSD modload(8) -b, -i, -s |
| Linux | dependencies | Linux modprobe reads modules.dep.bin, built by depmod, and loads or removes dependencies automatically. Linux insmod does not handle dependencies. The Solnix modload page describes no dependency handling. Source: Linux modprobe(8) DESCRIPTION; Linux insmod(8) DESCRIPTION; Solnix modload(8) DESCRIPTION |
| FreeBSD | multiple files and file suffix | FreeBSD kldload accepts several files and tries all of them even if some fail. It loads file.ko, and the .ko suffix is optional. Solnix modload takes a single filename, and the page describes no suffix handling. Source: FreeBSD kldload(8) SYNOPSIS, DESCRIPTION; Solnix modload(8) SYNOPSIS |
| Linux, FreeBSD, NetBSD | force and already-loaded handling | Solnix modload has no force option and the page says nothing about already-loaded modules. NetBSD -f skips compatibility checks. Linux modprobe has --force, --force-vermagic and --force-modversion. FreeBSD -n skips a module that is already loaded.Source: Solnix modload(8) OPTIONS; NetBSD modload(8) -f; Linux modprobe(8) OPTIONS; FreeBSD kldload(8) -n |
| FreeBSD | exit status and security level | FreeBSD kldload documents exit 0 on success and >0 on error, and notes that the kernel security level can refuse a load with Operation not permitted. The Solnix page has no EXIT STATUS section and does not mention security levels. Source: FreeBSD kldload(8) EXIT STATUS, NOTES; Solnix modload(8) (no EXIT STATUS section) |
Everyday tasks
| Task | Solnix | Linux | FreeBSD | NetBSD |
|---|---|---|---|---|
| load a module from a file path | modload /path/to/module | insmod filename | kldload ./file.ko | modload /path/to/module |
| load a module from the system module path | modload -p drv/foo | modprobe modulename | kldload file | modload module |
| load a module and its dependencies | — | modprobe modulename | — | — |
| unload a module | modunload (see modunload(8)) | modprobe -r modulename; rmmod (see insmod(8) SEE ALSO) | kldunload (see kldload(8) SEE ALSO) | modunload (see modload(8) SEE ALSO) |
| list loaded modules | modinfo (see modinfo(8)) | lsmod (see insmod(8) SEE ALSO) | kldstat (see kldload(8) SEE ALSO) | modstat (see modload(8) SEE ALSO) |
Standards
- POSIX: modload is not a POSIX.1-2024 utility.
Writing portable scripts
- Do not use one modload or kldload invocation across systems. Branch on the loader that is present (modload, kldload, insmod/modprobe), and pass an explicit path (absolute, or ./ relative) so lookup rules do not matter.
- Do not rely on
-p, which means a modpath search on Solnix but prints a property list on NetBSD.
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.