unshare(8) on Solnix vs Linux and the BSDs
Solnix unshare(8) is the illumos /usr/sbin/unshare, which stops sharing a local file system resource so remote clients can no longer mount it. Linux unshare(1) is an unrelated command that runs a program in new namespaces, so the two share only a name.
The manual pages
- Solnix: unshare(8) from
pkgs.solnix.illumos-world-man· illumos.org - Linux: unshare(1) util-linux-2.42.3
What Solnix runs
A default Solnix system runs the illumos unshare at /usr/sbin/unshare. No other variants are shipped. Its companion is share(8), and shareall(8) is also listed. The bundle has no FreeBSD, OpenBSD or NetBSD unshare page, so nothing is compared with the BSDs.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| Linux | purpose | Solnix unshare(8) removes a shared local resource from NFS-style sharing. Linux unshare(1) creates new namespaces (mount, UTS, IPC, network, PID, cgroup, user, time) and then runs a program in them. The commands are not interchangeable. Source: Solnix unshare(8) NAME, DESCRIPTION; Linux unshare(1) NAME, DESCRIPTION |
| Linux | synopsis and arguments | Solnix takes an optional pathname or resourcename to stop sharing. Linux takes namespace options followed by a program and its arguments. If no program is given, Linux runs ${SHELL}, default /bin/sh.Source: Solnix unshare(8) SYNOPSIS; Linux unshare(1) SYNOPSIS, DESCRIPTION |
| Linux | -p meaning | Solnix unshare -p removes the resource from shared status persistently across reboots. Linux unshare -p (--pid[=file]) creates a new PID namespace. A Linux script using -p does something unrelated on Solnix.Source: Solnix unshare(8) -p; Linux unshare(1) -p, --pid |
| Linux | -o meaning and -F | Solnix -o passes file-system-specific options and -F FSType selects the file system type. Linux -o is not documented in the extracted text here, and Linux has no -F option in the flag list. Linux -f is --fork, not a file system type.Source: Solnix unshare(8) -F, -o; Linux unshare(1) option list, -f, --fork |
| Linux | default file system type | If -F is omitted, Solnix uses the first file system type listed in /etc/dfs/fstypes. Linux unshare(1) has no file system type concept and does not mention this file.Source: Solnix unshare(8) DESCRIPTION; Linux unshare(1) DESCRIPTION |
| Linux | error handling | On Solnix, if the pathname or resourcename is not in the shared information, an error message goes to standard error. The extracted Linux text does not describe an equivalent case. Source: Solnix unshare(8) NOTES; Linux unshare(1) DESCRIPTION |
| Linux | effect on remote clients | A successful Solnix unshare means a client that was mounting the file system no longer has access to it. Linux unshare only changes which namespaces the new process lives in. It does not affect remote clients. Source: Solnix unshare(8) NOTES; Linux unshare(1) DESCRIPTION |
| Linux | privilege and persistence model | Linux unshare namespaces last only while they have member processes, unless made persistent by bind mounting /proc/pid/ns/type files. Solnix uses -p to make the removal of sharing persistent across reboots.Source: Linux unshare(1) DESCRIPTION; Solnix unshare(8) -p |
Standards
- POSIX: unshare is not a POSIX.1-2024 utility.
- Solnix: The page SEE ALSO references attributes(7); the extracted text shows no ATTRIBUTES or stability table.
Writing portable scripts
- Do not call unshare by name in cross-platform scripts: it stops file system sharing on Solnix and creates namespaces on Linux. Test for the OS first.
- On Solnix, use share(8) and unshare(8). Do not assume the Linux
-p,-oor-fmeanings.
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.