localedef(1) on Solnix vs Linux and the BSDs

On Solnix, localedef is the illumos localedef at /usr/bin/localedef. It takes a localename operand and has the same interface as FreeBSD's. Linux's glibc-style localedef differs: -u names a repertoire map rather than a codeset, -v only adds warnings, and output goes to an outputpath or the locale archive.

What Solnix runs

A default Solnix system runs the illumos localedef at /usr/bin/localedef. No other variants are shipped. The page marks -U and -w as illumos extensions.

Differences

Compared withTopicWhat differs
Linux-u meaningSolnix -u code_set_name names a codeset that ISO/IEC 10646-1:2000 position constants are converted to, and the codeset must be supported by iconv_open(3C). Linux -u repertoirefile reads symbolic-name to Unicode code point mappings from a file.
Source: Solnix localedef(1) -u, NOTES; Linux localedef(1) -u, --repertoire-map
Linux-v meaningSolnix -v emits verbose debugging output on standard output. Linux -v (--verbose) generates extra warnings about errors that are normally ignored.
Source: Solnix localedef(1) -v; Linux localedef(1) -v, --verbose
Linuxfinal operand and output locationSolnix takes a localename; if it contains a slash it is a path name for the output. Linux takes an outputpath. With a slash it is a directory. With --no-archive it is a subdirectory of /usr/lib/locale. Otherwise the locale is added to /usr/lib/locale/locale-archive. The Solnix page describes no archive.
Source: Solnix localedef(1) OPERANDS; Linux localedef(1) DESCRIPTION (outputpath)
Linuxmissing Linux operations and optionsSolnix has no --add-to-archive, --delete-from-archive, --list-archive, --replace, --prefix, --big-endian, --little-endian or -A aliasfile. All options in the Solnix synopsis are single letters (-c -v -U -f -w -i -u).
Source: Solnix localedef(1) SYNOPSIS; Linux localedef(1) SYNOPSIS, OPTIONS
Linux-U and -w are missing on LinuxSolnix -U (ignore character symbols with no matching character definition) and -w widthfile (screen widths) are not in the Linux option list. Both are marked as illumos extensions on Solnix.
Source: Solnix localedef(1) -U, -w; Linux localedef(1) OPTIONS
Linuxcharmap and source lookupLinux searches the current directory, a default directory and $I18NPATH for the -f and -i files, and defaults to ANSI_X3.4-1968 with no charmap. Solnix -f and -i take a pathname; with no -i the source is read from standard input, and with no -f a default character mapping is used.
Source: Solnix localedef(1) -f, -i; Linux localedef(1) -f, -i, DESCRIPTION
FreeBSDendianness and output layoutFreeBSD adds -b and -l (big- or little-endian output) and -D (write <localename>.<category> files to the current directory). The Solnix page documents none of these.
Source: FreeBSD localedef(1) -b, -l, -D; Solnix localedef(1) SYNOPSIS
FreeBSD-V version stringFreeBSD -V version stores a version string, kept only for LC_COLLATE and retrievable with querylocale(3). Solnix has no -V. Linux -V prints the version and license instead.
Source: FreeBSD localedef(1) -V; Solnix localedef(1) SYNOPSIS; Linux localedef(1) -V, --version
FreeBSDenvironment variablesThe Solnix page lists LANG, LC_ALL, LC_COLLATE, LC_CTYPE, LC_MESSAGES and NLSPATH. FreeBSD also lists LC_MONETARY, LC_NUMERIC (misspelled LC_MUMERIC in the page) and LC_TIME.
Source: Solnix localedef(1) ENVIRONMENT VARIABLES; FreeBSD localedef(1) ENVIRONMENT
FreeBSDshared lineageFreeBSD's page says its localedef was written for illumos and first appeared in FreeBSD 11. The options -c -f -i -u -U -v -w and the exit values 0, 1, 2 and >3 are described the same way on both pages.
Source: FreeBSD localedef(1) HISTORY, EXIT STATUS; Solnix localedef(1) EXIT STATUS
Linuxexit status 1Solnix exit 1 means warnings occurred but the locales were created, and exit 2 and >3 are defined. The Linux page in the bundle lists 1 as warnings or errors occurred; the rest of that list is cut off.
Source: Solnix localedef(1) EXIT STATUS; Linux localedef(1) EXIT STATUS
OpenBSD, NetBSDnot comparedThe bundle has no OpenBSD or NetBSD localedef(1) page, so nothing is stated about those systems.
Source: Bundle header: counterparts are linux and freebsd only

Standards

  • POSIX: localedef is a POSIX.1-2024 utility.
  • Solnix: Interface Stability: Standard. -U and -w are marked as illumos extensions.

Writing portable scripts

  • For portable scripts use only -c, -f, -i and a localename; -u, -v, -U and -w differ or are missing between Linux, FreeBSD and Solnix.
  • Do not rely on where the output ends up. Linux may put it in a locale archive, FreeBSD with -D writes into the current directory, and Solnix only documents a path when localename contains a slash.

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.