mknod(1) on Solnix vs Linux and the BSDs

The published Solnix mknod(1) page is GNU coreutils 9.7, identical in content to the Linux page. A default Solnix system runs the illumos /usr/sbin/mknod, whose page is not in the bundle. The BSD pages are in section 8 and differ in syntax: the FreeBSD page documents no -m option, and NetBSD adds owner, replace and device-number format options.

What Solnix runs

The page published by pkgs.solnix.coreutils is GNU coreutils 9.7 mknod(1). The command on PATH on a default Solnix system is the illumos one at /usr/sbin/mknod, and no other illumos variants are shipped. The bundle does not include the illumos page, so this note cannot say how its options differ from the GNU page. The GNU page options (-m, -Z, --context) describe the coreutils build only.

Differences

Compared withTopicWhat differs
Linuxsame program as the published pageThe published Solnix page and the Linux page are the same GNU coreutils mknod: same synopsis, same -m, -Z, --context, --help, --version, same types b, c, u, p. The Solnix page is from coreutils 9.7, the Linux page from coreutils-full-9.11. This holds for the GNU build, not for the illumos binary on PATH.
Source: Solnix mknod(1) SYNOPSIS, DESCRIPTION; Linux mknod(1) SYNOPSIS, DESCRIPTION
FreeBSDno -m optionThe FreeBSD page documents no options at all, so there is no -m. The GNU page sets permissions with -m/--mode. A script using mknod -m will not match the FreeBSD page.
Source: FreeBSD mknod(8) SYNOPSIS; Solnix mknod(1) -m, --mode
FreeBSDno FIFO type, deprecated toolFreeBSD mknod(8) takes only b or c and calls the utility deprecated; devfs(4) manages device nodes. GNU mknod also creates FIFOs with type p. The FreeBSD SEE ALSO points to mkfifo(1).
Source: FreeBSD mknod(8) SYNOPSIS, DESCRIPTION, COMPATIBILITY, SEE ALSO; Solnix mknod(1) TYPE p
FreeBSDname-only form and owner:groupFreeBSD mknod name alone recreates a deleted devfs(4) node, and an optional owner:group operand sets ownership. This is FreeBSD-specific. GNU mknod always needs TYPE, and for b, c or u also MAJOR and MINOR. It has no ownership operand.
Source: FreeBSD mknod(8) DESCRIPTION, COMPATIBILITY; Solnix mknod(1) SYNOPSIS
NetBSDextra options: owner, replace, format, listNetBSD adds -u uid, -g gid, -r and -R (replace an existing file of the wrong type, -R also fixes mode and owner), -F fmt (device-number packing for other OSes) and -l (list kernel drivers). The GNU page has none of these.
Source: NetBSD mknod(8) SYNOPSIS, -u, -g, -r, -R, -F, -l; Solnix mknod(1) OPTIONS
NetBSDdevice argument formsNetBSD accepts a driver name instead of a major number, major unit subunit, or a single opaque number. GNU takes only MAJOR MINOR. GNU lets either number be hex (0x), octal (leading 0) or decimal.
Source: NetBSD mknod(8) SYNOPSIS, driver | major, unit and subunit, number; Solnix mknod(1) DESCRIPTION
all foursecurity context optionsGNU mknod has -Z and --context[=CTX] to set an SELinux or SMACK security context. None of the BSD pages document an equivalent. The Solnix page documents them for the GNU build.
Source: Solnix mknod(1) -Z, --context; FreeBSD/OpenBSD/NetBSD mknod(8) SYNOPSIS
OpenBSDmultiple nodes per callOpenBSD mknod accepts several name/type/major/minor lists in one command, as an extension, and -m is not reset between lists. The GNU synopsis takes a single NAME TYPE [MAJOR MINOR].
Source: OpenBSD mknod(8) STANDARDS; Solnix mknod(1) SYNOPSIS
OpenBSD, NetBSD-m syntax and default modeGNU -m MODE replaces the default of a=rw minus the umask. OpenBSD says symbolic modes are relative to an initial a=rw; NetBSD only says the mode may be absolute or symbolic. Neither BSD page mentions the umask. OpenBSD requires -m before the name.
Source: Solnix mknod(1) -m; OpenBSD mknod(8) -m; NetBSD mknod(8) -m
FreeBSD, OpenBSD, NetBSDmanual section and type uThe BSD pages are mknod(8), the Solnix and Linux pages mknod(1). GNU accepts u as a synonym for c. The BSD pages list only b, c and (OpenBSD, NetBSD) p.
Source: Solnix mknod(1) TYPE c, u; FreeBSD/OpenBSD/NetBSD mknod(8) NAME, SYNOPSIS
all fourdevice creation conventionOpenBSD and NetBSD say /dev/MAKEDEV normally calls mknod to create device nodes. The GNU page does not mention MAKEDEV, and it warns that a shell's own mknod may take precedence over the program.
Source: OpenBSD mknod(8) DESCRIPTION; NetBSD mknod(8) DESCRIPTION; Solnix mknod(1) DESCRIPTION (last paragraph)

Standards

  • POSIX: mknod is not a POSIX.1-2024 utility.
  • OpenBSD: The STANDARDS section lists only the extension that allows multiple parameter lists in one call.
  • FreeBSD: The chown(8)-like owner:group functionality is specific to FreeBSD.

Writing portable scripts

  • Do not rely on -m with FreeBSD, which documents no options. Create with mknod, then run chmod.
  • Use the form mknod [-m mode] name type major minor, with decimal numbers. Type p (FIFO) is not documented for FreeBSD mknod; use mkfifo(1) for FIFOs.

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.