From: Karel Zak Date: Thu, 16 Apr 2026 12:25:14 +0000 (+0200) Subject: nsenter: update shell selection documentation X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ccd33bf57ce2ee00b0dab6062143bc985c78623;p=thirdparty%2Futil-linux.git nsenter: update shell selection documentation 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 --- diff --git a/sys-utils/nsenter.1.adoc b/sys-utils/nsenter.1.adoc index 34fde93ac..60e2d19ae 100644 --- a/sys-utils/nsenter.1.adoc +++ b/sys-utils/nsenter.1.adoc @@ -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.