eject(1) on Solnix vs Linux and the BSDs

On Solnix, eject is the illumos eject at /usr/bin/eject. It takes only -d, -f, -l, -q and -t. Single-letter flags differ widely from Linux and NetBSD: -l lists ejectable devices (NetBSD: loads media), -f forces the eject (Linux: selects the floppy method), and -q queries for media (Linux: tape eject).

What Solnix runs

A default Solnix system runs the illumos eject at /usr/bin/eject. No other variants are shipped. The Solnix page points to volcheck(1) for floppies and rmmount(1), but the bundle does not describe them.

Differences

Compared withTopicWhat differs
Linux-f meaningSolnix eject -f forces the eject even if the device is busy or has mounted partitions. On Linux, -f selects the removable-floppy eject method, and force is -F/--force.
Source: Solnix eject(1) -f, DESCRIPTION; Linux eject(1) -f, -F
NetBSD-f and unmountingSolnix eject -f ejects even when the device has mounted partitions. If an unmount fails without -f, eject warns and exits. NetBSD -f skips the unmount attempt altogether.
Source: Solnix eject(1) DESCRIPTION, -f; NetBSD eject(1) -f
Linux-q meaningSolnix eject -q only queries whether media is present, with exit 0 for present and 1 for absent. On Linux, -q selects the tape-offline eject method and ejects.
Source: Solnix eject(1) -q, EXIT STATUS; Linux eject(1) -q, --tape
NetBSD-l meaningSolnix eject -l displays paths and nicknames of ejectable devices. NetBSD -l loads media into a cdrom drive, and listing nicknames is -n. Linux has no -l.
Source: Solnix eject(1) -l; NetBSD eject(1) -l, -n; Linux eject(1) OPTIONS
Linux, NetBSD-d meaningSolnix eject -d displays the name of the default device. Linux -d/--default also lists the default device. NetBSD marks -d as deprecated.
Source: Solnix eject(1) -d; Linux eject(1) -d, --default; NetBSD eject(1) -d
NetBSD-t meaningSolnix eject -t sends a CD-ROM tray close command and takes no argument. Linux -t/--trayclose does the same. NetBSD -t takes a device-type argument (diskette, floppy, cdrom, disk or tape).
Source: Solnix eject(1) -t; Linux eject(1) -t; NetBSD eject(1) -t device-type
Linux, NetBSDdefault deviceWith no device operand, Solnix eject uses its default device, shown by -d. Linux documents /dev/cdrom as the default name. The NetBSD synopsis shows device as required in the form with options.
Source: Solnix eject(1) DESCRIPTION, -d; Linux eject(1) DESCRIPTION; NetBSD eject(1) SYNOPSIS
Linux, NetBSDdevice namingSolnix accepts a /dev name or a nickname such as a volume label, cdrom or floppy0. Linux also accepts mountpoints, UUID=uuid and LABEL=label. NetBSD accepts a /dev/ path or built-in nicknames.
Source: Solnix eject(1) OPERANDS; Linux eject(1) DESCRIPTION; NetBSD eject(1) DESCRIPTION
Linux, NetBSDexit statusSolnix eject uses codes 0 to 4: 2 for invalid options, 3 for a failed ioctl() and 4 when manually ejectable media can now be removed. Linux documents only 0 and 1. The NetBSD page has no EXIT STATUS section.
Source: Solnix eject(1) EXIT STATUS; Linux eject(1) EXIT STATUS; NetBSD eject(1)
Linux, NetBSDmissing optionsSolnix eject has no verbose option, no media lock or unlock, no CD speed or changer-slot selection, and no tray toggle. These exist as Linux -v, -c, -x and -T, and NetBSD -v, -L and -U.
Source: Solnix eject(1) SYNOPSIS; Linux eject(1) -v, -c, -x, -T; NetBSD eject(1) -v, -L, -U
Linux, NetBSDmanual-eject mediaFor media that can only be ejected manually, Solnix eject unmounts the file system, prints a message and exits 4. The Linux and NetBSD pages do not describe this case in the bundle.
Source: Solnix eject(1) DESCRIPTION, EXIT STATUS; Linux eject(1); NetBSD eject(1)

Standards

  • POSIX: eject is not a POSIX.1-2024 utility.

Writing portable scripts

  • Avoid combining eject with flags in scripts. -f, -l, -q and -t mean different things on Solnix, Linux and NetBSD. Run plain eject with a device name.
  • Do not rely on the exit status beyond 0 and non-zero. Solnix uses 0 to 4, while Linux documents only 0 and 1.

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.