vi(1) on Solnix vs Linux and the BSDs
On Solnix, vi is nvi (nex/nvi), the same family of editor as FreeBSD, OpenBSD, NetBSD and the Linux nvi package, not the illumos vi. The Solnix page is close to FreeBSD's. The differences are small: -F exists on Solnix, FreeBSD and OpenBSD but not Linux, and -l exists only on Linux and NetBSD.
The manual pages
What Solnix runs
A default Solnix system runs nvi (package pkgs.solnix.nvi) as vi on PATH. The illumos variants /usr/xpg4/bin/vi, /usr/xpg6/bin/vi and /usr/ucb/vi are also shipped, but the bundle does not describe them or say how they differ from nvi.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| Linux | -F option | Solnix vi accepts -F, which skips the full copy of the file made at start. The Linux nvi page says -F was removed and is no longer available. A script using vi -F works on Solnix but may fail on Linux.Source: Solnix vi(1) -F; Linux vi(1) note after OPTIONS (-F removed) |
| Linux, NetBSD | -l option | Linux and NetBSD document -l (start with the lisp and showmatch options set). The Solnix, FreeBSD and OpenBSD pages have no -l, so it is not documented for Solnix vi.Source: Linux vi(1) -l; NetBSD vi(1) -l; Solnix vi(1) SYNOPSIS |
| NetBSD | -G gtags mode and -F | NetBSD documents -G (gtags mode, as if the gtagsmode option was set), which Solnix does not. The NetBSD page also has no -F, which Solnix does have.Source: NetBSD vi(1) -G, SYNOPSIS; Solnix vi(1) -F |
| Linux, NetBSD | -v wording | On Linux and NetBSD, -v starts vi mode 'as if the command name was vi or view'. On Solnix, FreeBSD and OpenBSD the text says only 'vi'.Source: Linux vi(1) -v; NetBSD vi(1) -v; Solnix vi(1) -v |
| Linux, NetBSD | EXINIT and startup order | On Solnix, EXINIT is read after /etc/vi.exrc unless NEXINIT is also set, and NEXINIT is read after /etc/vi.exrc. The Linux and NetBSD pages say only that EXINIT is read if NEXINIT is not set, and do not name /etc/vi.exrc.Source: Solnix vi(1) ENVIRONMENT EXINIT, NEXINIT; Linux vi(1) ENVIRONMENT VARIABLES EXINIT; NetBSD vi(1) ENVIRONMENT VARIABLES EXINIT |
| OpenBSD | TMPDIR | The Solnix page documents TMPDIR as the location for temporary files. The OpenBSD page lists no TMPDIR in ENVIRONMENT, and its STANDARDS section says TMPDIR is ignored. Source: Solnix vi(1) ENVIRONMENT TMPDIR; OpenBSD vi(1) STANDARDS |
| OpenBSD | documented deviations from POSIX | OpenBSD lists deviations: the s ex command may not be called as substitute, the directory, redraw and slowopen settings are not implemented, and the paragraphs and sections defaults suit mdoc(7). The Solnix STANDARDS section lists none, so the manual does not say whether Solnix nvi shares them. Source: OpenBSD vi(1) STANDARDS; Solnix vi(1) STANDARDS |
| Linux, NetBSD | -r fallback | On Solnix, -r edits the file normally when no recoverable file by that name exists. The NetBSD page does not say this. The Linux page does.Source: Solnix vi(1) -r; NetBSD vi(1) -r; Linux vi(1) -r |
| Linux, NetBSD | POSIX baseline named | Solnix, FreeBSD and OpenBSD say nex/nvi is close to IEEE Std 1003.1-2008 (“POSIX.1”). The Linux and NetBSD pages say it is close to IEEE Std1003.2 (“POSIX”). Source: Solnix vi(1) STANDARDS; Linux vi(1) STANDARDS; NetBSD vi(1) STANDARDS |
| FreeBSD | same page as FreeBSD | The Solnix and FreeBSD vi pages have the same synopsis, option set, environment variables, exit status and STANDARDS text. The bundle shows no difference in documented behaviour. Source: Solnix vi(1) SYNOPSIS, OPTIONS, ENVIRONMENT; FreeBSD vi(1) SYNOPSIS, OPTIONS, ENVIRONMENT |
Standards
- POSIX: vi is a POSIX.1-2024 utility.
- Solnix: nex/nvi is close to IEEE Std 1003.1-2008 (“POSIX.1”). That document differs from historical ex/vi practice in several places; there are changes to be made on both sides.
- Linux: Nex/nvi is close to IEEE Std1003.2 (“POSIX”).
- OpenBSD: nex/nvi is close to IEEE Std 1003.1-2008 (“POSIX.1”), with five listed deviations.
- NetBSD: Nex/nvi is close to IEEE Std1003.2 (“POSIX”).
Writing portable scripts
- Use only
-c,-e,-R,-r,-S,-s,-t,-vand-win portable scripts. Avoid-F,-land-G, which are missing on some systems. - For scripted edits, use ex with
-sand feed commands on standard input. The pages for all five systems say ex then runs in batch mode.
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.