env - Set environment for command invocation

Synopsis

env [-i | -] [name=value ...] [utility [argument ...]]

Description

The env utility obtains the current environment, modifies it according to the arguments, and then invokes the specified utility. Any arguments are passed to the utility. If no utility is specified, the resulting environment is written to standard output with one name=value per line.

Options

-
Invoke the utility with exactly the environment specified on the command. The inherited environment is ignored completely.
-i
Same as '-'.

Operands

name=value
This modifies the run-time environment and is placed into the inherited environment before the utility is invoked.
utility
The name of the command or utility to be invoked.
argument
A string to pass to the invoked command or utility.

Exit status

  • 0 when successful
  • >0 when an error occurs