.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.50.1.
.TH ENV "1" "February 2026" "GNU coreutils 9.10" "User Commands"
.SH NAME
env \- run a program in a modified environment
.SH SYNOPSIS
.B env
[\fI\,OPTION\/\fR]... [\fI\,-\/\fR] [\fI\,NAME=VALUE\/\fR]... [\fI\,COMMAND \/\fR[\fI\,ARG\/\fR]...]
.SH DESCRIPTION
.\" Add any additional description here
.PP
Set each NAME to VALUE in the environment and run COMMAND.
.PP
Mandatory arguments to long options are mandatory for short options too.
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#env-a'\fB\-a, \-\-argv0=\,ARG\fP\X'tty: link'\/\fR
pass ARG as the zeroth argument of COMMAND
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#env-i'\fB\-i, \-\-ignore\-environment\fP\X'tty: link'
start with an empty environment
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#env-0'\fB\-0, \-\-null\fP\X'tty: link'
end each output line with NUL, not newline
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#env-u'\fB\-u, \-\-unset=\,NAME\fP\X'tty: link'\/\fR
remove variable from the environment
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#env-C'\fB\-C, \-\-chdir=\,DIR\fP\X'tty: link'\/\fR
change working directory to DIR
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#env-S'\fB\-S, \-\-split\-string=\,S\fP\X'tty: link'\/\fR
process and split S into separate arguments;
used to pass multiple arguments on shebang lines
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#env--block-signal'\fB\-\-block\-signal[=SIG]\fP\X'tty: link'
block delivery of SIG signal(s) to COMMAND
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#env--default-signal'\fB\-\-default\-signal[=SIG]\fP\X'tty: link'
reset handling of SIG signal(s) to the default
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#env--ignore-signal'\fB\-\-ignore\-signal[=SIG]\fP\X'tty: link'
set handling of SIG signal(s) to do nothing
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#env--list-signal-handling'\fB\-\-list\-signal\-handling\fP\X'tty: link'
list non default signal handling to standard error
.TP
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#env-v'\fB\-v, \-\-debug\fP\X'tty: link'
print verbose information for each processing step
.TP
\X'tty: link https://www.gnu.org/software/coreutils/env#env--help'\fB\-\-help\fP\X'tty: link'
display this help and exit
.TP
\X'tty: link https://www.gnu.org/software/coreutils/env#env--version'\fB\-\-version\fP\X'tty: link'
output version information and exit
.PP
A mere \- implies \fB\-i\fR. If no COMMAND, print the resulting environment.
.PP
SIG may be a signal name like 'PIPE', or a signal number like '13'.
Without SIG, all known signals are included. Multiple signals can be
comma\-separated. An empty SIG argument is a no\-op.
.SS "Exit status:"
.TP
125
if the env command itself fails
.TP
126
if COMMAND is found but cannot be invoked
.TP
127
if COMMAND cannot be found
.TP
\-
the exit status of COMMAND otherwise
.SH "SCRIPT OPTION HANDLING"
The
.B \-S
option allows specifying multiple arguments in a script.
Running a script named
.B 1.pl
containing the following first line:
.PP
.RS
.nf
#!/usr/bin/env \-S perl \-w \-T
\&...
.fi
.RE
.PP
Will execute
.B "perl \-w \-T 1.pl"
.PP
Without the
.B '\-S'
parameter the script will likely fail with:
.PP
.RS
.nf
/usr/bin/env: 'perl \-w \-T': No such file or directory
.fi
.RE
.PP
See the full documentation for more details.
.PP
.SH NOTES
POSIX's \fBexec\fP(3p) pages says:
.RS
"many existing applications wrongly assume that they start with certain
signals set to the default action and/or unblocked.... Therefore, it is best
not to block or ignore signals across execs without explicit reason to do so,
and especially not to block signals across execs of arbitrary (not closely
cooperating) programs."
.RE
.SH AUTHOR
Written by Richard Mlynarik, David MacKenzie, and Assaf Gordon.
.SH "REPORTING BUGS"
Report bugs to: bug\-coreutils@gnu.org
.br
GNU coreutils home page:
.br
General help using GNU software:
.br
Report any translation bugs to
.SH COPYRIGHT
Copyright \(co 2026 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later .
.br
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
.SH "SEE ALSO"
\fBsigaction\fP(2), \fBsigprocmask\fP(2), \fBsignal\fP(7)
.PP
.br
Full documentation
.br
or available locally via: info \(aq(coreutils) env invocation\(aq