modunload(8) on Solnix vs Linux and the BSDs
On Solnix, modunload is the illumos /usr/sbin/modunload. It unloads a kernel module by name or by numeric ID taken from modinfo(8). Linux rmmod and FreeBSD kldunload cover the same task under different names and options, and only NetBSD shares the name.
The manual pages
- Solnix: modunload(8) from
pkgs.solnix.illumos-world-man· illumos.org - Linux: rmmod(8) kmod-31 (different command, similar job)
- FreeBSD: kldunload(8) 15.1-RELEASE (different command, similar job)
- NetBSD: modunload(8) 11.0
What Solnix runs
A default Solnix system runs the illumos modunload at /usr/sbin/modunload. No other variants are shipped. Use modinfo(8) to find module names and IDs. For driver configuration changes the page points to update_drv(8) as the supported route.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| Linux, FreeBSD, NetBSD | selecting the module | Solnix takes either a module name or -i module_id, and one of them is required. NetBSD takes only names, and the page lists them as coming from modstat(8). Linux rmmod takes a module name only.Source: Solnix modunload(8) SYNOPSIS, OPERANDS, -i; NetBSD modunload(8) SYNOPSIS; Linux rmmod(8) SYNOPSIS |
| FreeBSD | -i and -n flags | Solnix -i takes a module ID and the name is a plain operand with no -n flag. FreeBSD kldunload has both -i id and -n name, and accepts several names or IDs per call. Solnix takes one.Source: Solnix modunload(8) SYNOPSIS, -i; FreeBSD kldunload(8) SYNOPSIS, -i, -n |
| NetBSD | multiple names | NetBSD modunload accepts several names (name ...) in one call. The Solnix synopsis shows a single module_name or a single -i module_id.Source: NetBSD modunload(8) SYNOPSIS; Solnix modunload(8) SYNOPSIS |
| Linux, FreeBSD | no force option | Solnix modunload has no force flag. Linux rmmod -f and FreeBSD kldunload -f remove modules that are in use, and on Linux only if the kernel was built with CONFIG_MODULE_FORCE_UNLOAD. Solnix -e is a different feature.Source: Solnix modunload(8) OPTIONS; Linux rmmod(8) -f; FreeBSD kldunload(8) -f |
| Linux, FreeBSD, NetBSD | -e pre-unload hook | Solnix -e exec_file runs a script or executable before the unload. It gets the module ID in decimal, then a type-specific second argument such as the driver major number, or -1 where none applies. The other three pages document no such option.Source: Solnix modunload(8) -e; Linux rmmod(8) OPTIONS; FreeBSD kldunload(8) OPTIONS; NetBSD modunload(8) DESCRIPTION |
| Linux, FreeBSD, NetBSD | module ID 0 | On Solnix, -i 0 attempts to unload all autoloaded modules, and modules loaded by modload(8) are not affected. The other pages describe no equivalent.Source: Solnix modunload(8) DESCRIPTION; Linux rmmod(8); FreeBSD kldunload(8); NetBSD modunload(8) |
| Linux, FreeBSD | verbose and syslog flags | Solnix has no -v or -s. Linux rmmod has -v (verbose) and -s (errors to syslog). FreeBSD kldunload has -v. Linux rmmod also has -V to show the version.Source: Solnix modunload(8) SYNOPSIS; Linux rmmod(8) -v, -s, -V; FreeBSD kldunload(8) -v |
| NetBSD | builtin modules | NetBSD modunload does not remove builtin modules from memory but disables them, and modload(8) re-enables them. The Solnix page does not describe builtin modules. Source: NetBSD modunload(8) DESCRIPTION; Solnix modunload(8) DESCRIPTION |
| Linux, FreeBSD, NetBSD | rereading driver configuration | Solnix NOTES say modunload on a driver is often used to force a reread of its configuration file. This is not the supported method and may stop working. The supported method is update_drv(8). The other pages say nothing similar. Source: Solnix modunload(8) NOTES; Linux rmmod(8); FreeBSD kldunload(8); NetBSD modunload(8) |
| Linux | dependent modules | Linux rmmod removes only the named module, and the page recommends modprobe -r to also remove unused dependent modules. The Solnix page does not mention dependencies.Source: Linux rmmod(8) DESCRIPTION; Solnix modunload(8) DESCRIPTION |
Everyday tasks
| Task | Solnix | Linux | FreeBSD | NetBSD |
|---|---|---|---|---|
| unload a module by name | modunload module_name | rmmod modulename | kldunload name | modunload name |
| unload a module by ID | modunload -i module_id | — | kldunload -i id | — |
| force unload of a module in use | — | rmmod -f modulename | kldunload -f name | — |
| find the module name or ID | modinfo(8) | lsmod(8) | kldstat(8) | modstat(8) |
Standards
- POSIX: modunload is not a POSIX.1-2024 utility.
- Solnix: The SEE ALSO section refers to attributes(7), but the bundle text gives no interface stability level.
Writing portable scripts
- Do not share a modunload call across systems. Pick the tool that is present (modunload, rmmod or kldunload) and use its own way of naming the module.
- Check only for exit status 0 versus non-zero. Solnix and FreeBSD document just 0 for success and >0 for failure.
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.