OS Manuals

/usr/bin/env

GNU core utilities

From coreutils 9.12-r7 (os), captured 2026-11-05 by running env --help (exit 0). permalink

Usage: /usr/bin/env [OPTION]... [-] [NAME=VALUE]... [COMMAND [ARG]...]
Set each NAME to VALUE in the environment and run COMMAND.

Mandatory arguments to long options are mandatory for short options too.
  -a, --argv0=ARG
         pass ARG as the zeroth argument of COMMAND
  -i, --ignore-environment
         start with an empty environment
      --env0-from=FILE
         read NUL-delimited environment entries from FILE
  -0, --null
         end each output line with NUL, not newline
  -u, --unset=NAME
         remove variable from the environment
  -C, --chdir=DIR
         change working directory to DIR
  -S, --split-string=S
         process and split S into separate arguments;
         used to pass multiple arguments on shebang lines
      --block-signal[=SIG]
         block delivery of SIG signal(s) to COMMAND
      --default-signal[=SIG]
         reset handling of SIG signal(s) to the default
      --ignore-signal[=SIG]
         set handling of SIG signal(s) to do nothing
      --list-signal-handling
         list non default signal handling to standard error
  -v, --debug
         print verbose information for each processing step
      --help
         display this help and exit
      --version
         output version information and exit

A mere - implies -i.  If no COMMAND, print the resulting environment.

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.

Exit status:
  125  if the env command itself fails
  126  if COMMAND is found but cannot be invoked
  127  if COMMAND cannot be found
  -    the exit status of COMMAND otherwise

Report bugs to: <bug-coreutils@gnu.org>.
GNU coreutils home page: <https://www.gnu.org/software/coreutils/>
General help using GNU software: <https://www.gnu.org/gethelp/>
Full documentation <https://www.gnu.org/software/coreutils/env>
or available locally via: info '(coreutils) env invocation'
Options (14)
OptionDescriptionSource
-a, --argv0 ARGpass ARG as the zeroth argument of COMMANDhelp + man
-i, --ignore-environmentstart with an empty environmenthelp + man
--env0-from FILEread NUL-delimited environment entries from FILEhelp + man
-0, --nullend each output line with NUL, not newlinehelp + man
-u, --unset NAMEremove variable from the environmenthelp + man
-C, --chdir DIRchange working directory to DIRhelp + man
-S, --split-string Sprocess and split S into separate arguments;help + man
--block-signal SIGblock delivery of SIG signal(s) to COMMANDhelp
--default-signal SIGreset handling of SIG signal(s) to the defaulthelp
--ignore-signal SIGset handling of SIG signal(s) to do nothinghelp
--list-signal-handlinglist non default signal handling to standard errorhelp + man
-v, --debugprint verbose information for each processing stephelp + man
--helpdisplay this help and exithelp + man
--versionoutput version information and exithelp + man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.