arch(1) on Solnix vs Linux and the BSDs

On Solnix, arch is the illumos arch at /usr/bin/arch. The manual calls it a compatibility command and discourages its use in favour of uname. Unlike OpenBSD arch, it can test an architecture name and returns TRUE/FALSE, and it has no -s.

What Solnix runs

A default Solnix system runs the illumos arch at /usr/bin/arch. /usr/ucb/arch is also shipped, but the bundle does not describe how it differs. The Solnix page documents arch only. It does not describe a separate machine command, though it lists mach(1) under SEE ALSO. Linux and FreeBSD have no counterpart page in this bundle.

Differences

Compared withTopicWhat differs
OpenBSDarchname operandSolnix arch accepts an archname operand, such as sun4 or i86pc, and returns 0 (TRUE) if binaries for that architecture can run on the host, otherwise 1 (FALSE). OpenBSD arch takes no operand.
Source: Solnix arch(1) SYNOPSIS, OPERANDS (archname); OpenBSD arch(1) SYNOPSIS
OpenBSD-s short formOpenBSD arch -s prints the architecture without the operating system prefix. Solnix arch has no -s, so a script using it fails on Solnix.
Source: OpenBSD arch(1) -s; Solnix arch(1) SYNOPSIS, OPTIONS
OpenBSDdefault outputOpenBSD arch prints the application architecture, defined by both the operating system and the instruction set. The Solnix page describes the application architecture without an OS part. On SunOS 5.x SPARC systems it always returns "sun4".
Source: OpenBSD arch(1) DESCRIPTION; Solnix arch(1) DESCRIPTION
OpenBSD-k meaningBoth systems use -k to print the kernel architecture instead. The Solnix page gives sun4u as an example and says it matters only to programs that depend on the kernel, such as ps(1). The OpenBSD page says the kernel architecture has no operating system part.
Source: Solnix arch(1) -k; OpenBSD arch(1) -k, DESCRIPTION
OpenBSDmachine commandOpenBSD documents a separate machine command, with -a to show the application architecture. The Solnix arch page documents no such command, and the bundle does not describe mach(1).
Source: OpenBSD arch(1) SYNOPSIS, machine -a; Solnix arch(1) SEE ALSO
OpenBSDtarget vs hostOpenBSD says arch and machine report the target architecture, not the host that uname(1) describes, for use in cross-compilation scripts. The Solnix page says arch shows the architecture of the current host and recommends uname instead.
Source: OpenBSD arch(1) DESCRIPTION; Solnix arch(1) NAME, NOTES
OpenBSDexit statusThe Solnix page documents 0 for success and >0 for an error, and 0/1 as TRUE/FALSE for the archname test. The OpenBSD page has no EXIT STATUS section.
Source: Solnix arch(1) EXIT STATUS, OPERANDS; OpenBSD arch(1)

Standards

  • POSIX: arch is not a POSIX.1-2024 utility.
  • OpenBSD: The OpenBSD arch(1) page in the bundle has no STANDARDS section.

Writing portable scripts

  • Do not rely on arch in portable scripts: the options differ (-s only on OpenBSD) and the Solnix manual discourages it. Use uname(1), which both pages point to.

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.