Debian Codegraph @

upstream/debian-unstable/man1/env.1

raw
1 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.50.1.
2 .TH ENV "1" "February 2026" "GNU coreutils 9.10" "User Commands"
3 .SH NAME
4 env \- run a program in a modified environment
5 .SH SYNOPSIS
6 .B env
7 [\fI\,OPTION\/\fR]... [\fI\,-\/\fR] [\fI\,NAME=VALUE\/\fR]... [\fI\,COMMAND \/\fR[\fI\,ARG\/\fR]...]
8 .SH DESCRIPTION
9 .\" Add any additional description here
10 .PP
11 Set each NAME to VALUE in the environment and run COMMAND.
12 .PP
13 Mandatory arguments to long options are mandatory for short options too.
14 .TP
15 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#env-a'\fB\-a, \-\-argv0=\,ARG\fP\X'tty: link'\/\fR
16 pass ARG as the zeroth argument of COMMAND
17 .TP
18 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#env-i'\fB\-i, \-\-ignore\-environment\fP\X'tty: link'
19 start with an empty environment
20 .TP
21 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#env-0'\fB\-0, \-\-null\fP\X'tty: link'
22 end each output line with NUL, not newline
23 .TP
24 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#env-u'\fB\-u, \-\-unset=\,NAME\fP\X'tty: link'\/\fR
25 remove variable from the environment
26 .TP
27 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#env-C'\fB\-C, \-\-chdir=\,DIR\fP\X'tty: link'\/\fR
28 change working directory to DIR
29 .TP
30 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#env-S'\fB\-S, \-\-split\-string=\,S\fP\X'tty: link'\/\fR
31 process and split S into separate arguments;
32 used to pass multiple arguments on shebang lines
33 .TP
34 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#env--block-signal'\fB\-\-block\-signal[=SIG]\fP\X'tty: link'
35 block delivery of SIG signal(s) to COMMAND
36 .TP
37 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#env--default-signal'\fB\-\-default\-signal[=SIG]\fP\X'tty: link'
38 reset handling of SIG signal(s) to the default
39 .TP
40 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#env--ignore-signal'\fB\-\-ignore\-signal[=SIG]\fP\X'tty: link'
41 set handling of SIG signal(s) to do nothing
42 .TP
43 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#env--list-signal-handling'\fB\-\-list\-signal\-handling\fP\X'tty: link'
44 list non default signal handling to standard error
45 .TP
46 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#env-v'\fB\-v, \-\-debug\fP\X'tty: link'
47 print verbose information for each processing step
48 .TP
49 \X'tty: link https://www.gnu.org/software/coreutils/env#env--help'\fB\-\-help\fP\X'tty: link'
50 display this help and exit
51 .TP
52 \X'tty: link https://www.gnu.org/software/coreutils/env#env--version'\fB\-\-version\fP\X'tty: link'
53 output version information and exit
54 .PP
55 A mere \- implies \fB\-i\fR. If no COMMAND, print the resulting environment.
56 .PP
57 SIG may be a signal name like 'PIPE', or a signal number like '13'.
58 Without SIG, all known signals are included. Multiple signals can be
59 comma\-separated. An empty SIG argument is a no\-op.
60 .SS "Exit status:"
61 .TP
62 125
63 if the env command itself fails
64 .TP
65 126
66 if COMMAND is found but cannot be invoked
67 .TP
68 127
69 if COMMAND cannot be found
70 .TP
71 \-
72 the exit status of COMMAND otherwise
73 .SH "SCRIPT OPTION HANDLING"
74 The
75 .B \-S
76 option allows specifying multiple arguments in a script.
77 Running a script named
78 .B 1.pl
79 containing the following first line:
80 .PP
81 .RS
82 .nf
83 #!/usr/bin/env \-S perl \-w \-T
84 \&...
85 .fi
86 .RE
87 .PP
88 Will execute
89 .B "perl \-w \-T 1.pl"
90 .PP
91 Without the
92 .B '\-S'
93 parameter the script will likely fail with:
94 .PP
95 .RS
96 .nf
97 /usr/bin/env: 'perl \-w \-T': No such file or directory
98 .fi
99 .RE
100 .PP
101 See the full documentation for more details.
102 .PP
103 .SH NOTES
104 POSIX's \fBexec\fP(3p) pages says:
105 .RS
106 "many existing applications wrongly assume that they start with certain
107 signals set to the default action and/or unblocked.... Therefore, it is best
108 not to block or ignore signals across execs without explicit reason to do so,
109 and especially not to block signals across execs of arbitrary (not closely
110 cooperating) programs."
111 .RE
112 .SH AUTHOR
113 Written by Richard Mlynarik, David MacKenzie, and Assaf Gordon.
114 .SH "REPORTING BUGS"
115 Report bugs to: bug\[email protected]
116 .br
117 GNU coreutils home page: <https://www.gnu.org/software/coreutils/>
118 .br
119 General help using GNU software: <https://www.gnu.org/gethelp/>
120 .br
121 Report any translation bugs to <https://translationproject.org/team/>
122 .SH "SEE ALSO"
123 \fBsigaction\fP(2), \fBsigprocmask\fP(2), \fBsignal\fP(7)
124 .PP
125 .br
126 Full documentation <https://www.gnu.org/software/coreutils/env>
127 .br
128 or available locally via: info \(aq(coreutils) env invocation\(aq
129 .PP
130 .br
131 Packaged by Debian (9.10\-1)
132 .br
133 Copyright \(co 2026 Free Software Foundation, Inc.
134 .br
135 License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
136 .br
137 This is free software: you are free to change and redistribute it.
138 .br
139 There is NO WARRANTY, to the extent permitted by law.