mac(1) on Solnix vs Linux and the BSDs

On Solnix, mac is the illumos /usr/bin/mac, a standalone command that computes a message authentication code through the cryptographic framework. Linux has no standalone mac command: the counterpart page is the generic openssl subcommand index, so the real interface is `openssl mac`. The bundle has no BSD counterpart.

What Solnix runs

A default Solnix system runs the illumos mac at /usr/bin/mac. No other variants are shipped. The package is pkgs.solnix.illumos-world-man.

Differences

Compared withTopicWhat differs
Linuxcommand formSolnix has a standalone mac command with its own options. On Linux, mac is a subcommand of openssl(1), run as `openssl mac`. The Linux page in the bundle is only the shared index for all openssl subcommands.
Source: Solnix mac(1) SYNOPSIS; Linux mac(1ssl) SYNOPSIS (openssl cmd), DESCRIPTION
Linuxoptions documentedThe Linux mac(1ssl) page documents only -help. It points to openssl-cmd(1) for details, and the bundle does not include that page. Solnix options (-a, -k, -K, -l, -T, -v) cannot be compared one-for-one from the bundle.
Source: Linux mac(1ssl) OPTIONS (-help), DESCRIPTION; Solnix mac(1) OPTIONS
Linuxalgorithm selection and listingOn Solnix, -a algorithm picks the algorithm by a case-sensitive alias such as md5_hmac, and -l lists the algorithms available from the cryptographic framework, with key sizes in bits. The Linux page in the bundle does not describe algorithm selection or listing.
Source: Solnix mac(1) -a, -l, USAGE Algorithms; Linux mac(1ssl) OPTIONS
Linuxkey inputOn Solnix, -k keyfile reads the key from a file. Without -k, mac prompts for key material with getpassphrase(3C), and the passphrase is turned into a key with PBKDF2 from PKCS #5. The Linux page does not describe key input.
Source: Solnix mac(1) -k, USAGE Passphrase; Linux mac(1ssl) OPTIONS
LinuxPKCS#11 token keysSolnix can take a symmetric key from a PKCS#11 token with -K key_label, and -T token_spec selects a token other than the default soft token store. The Linux page documents no equivalent option.
Source: Solnix mac(1) -K, -T; Linux mac(1ssl) OPTIONS
all fourgeneral-length MACsSolnix mac does not support algorithms that produce general-length MACs. The bundle gives no information on what the other systems support.
Source: Solnix mac(1) -a (Note on general length MACs)
FreeBSD, OpenBSD, NetBSDno BSD counterpartThe bundle includes no BSD page for mac, so no BSD comparison can be made. The manual does not say what the BSDs use for this task.
Source: Bundle header lists only a linux counterpart
Linuxoutput and exit statusSolnix prints one line of output per file when several files are given, and exits 0 on success and >0 on error. The Linux page in the bundle does not describe output format or exit status.
Source: Solnix mac(1) DESCRIPTION, EXIT STATUS; Linux mac(1ssl)

Standards

  • POSIX: mac is not a POSIX.1-2024 utility.
  • Solnix: Interface Stability: Evolving.

Writing portable scripts

  • Do not assume a mac command exists. On Linux it is run as `openssl mac`, and on Solnix as /usr/bin/mac. Check which is present, and for the BSDs consult their own documentation, since the bundle has no BSD page.

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.