]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
nsenter: update shell selection documentation
authorKarel Zak <kzak@redhat.com>
Thu, 16 Apr 2026 12:25:14 +0000 (14:25 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 16 Apr 2026 12:29:28 +0000 (14:29 +0200)
Update DESCRIPTION and add ENVIRONMENT section with SHELL entry,
documenting that when $SHELL is not set, the shell from the user's
passwd(5) entry is used before falling back to /bin/sh.

Addresses: https://github.com/util-linux/util-linux/issues/4242
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/nsenter.1.adoc

index 34fde93ac8db8472580acbc9201ad1670cae7125..60e2d19ae635a8fccb3b1c501139dd23e947c6cb 100644 (file)
@@ -16,7 +16,7 @@ nsenter - run program in different namespaces
 
 == DESCRIPTION
 
-The *nsenter* command executes _program_ in the namespace(s) that are specified in the command-line options (described below). If _program_ is not given, then "$\{SHELL}" is run (default: _/bin/sh_).
+The *nsenter* command executes _program_ in the namespace(s) that are specified in the command-line options (described below). If _program_ is not given, then "$\{SHELL}" is run. If *SHELL* is not set, the shell from the user's passwd(5) entry is used. If no shell is defined there either, _/bin/sh_ is used as the fallback.
 
 Enterable namespaces are:
 
@@ -158,6 +158,11 @@ Add the initiated process to the cgroup of the target process.
 
 include::man-common/help-version.adoc[]
 
+== ENVIRONMENT
+
+*SHELL*::
+The default shell to run when no _program_ is specified. If *SHELL* is not set, the shell from the user's passwd(5) entry is used. If no shell is defined there either, _/bin/sh_ is used as the fallback.
+
 == NOTES
 
 The *--user-parent* option requires Linux 4.9 or higher, older kernels will raise inappropriate ioctl for device error.