Set environment for command invocation (POSIX)
env [-i] [name=value]... [command [arguments]]
Deprecated:
env - [name=value]... [command [arguments]]
QNX Neutrino, Linux, Microsoft Windows
The env utility obtains the current environment, modifies it according to its arguments, and executes command with the modified environment. If no command is specified, the resulting environment is displayed.
If you have removed the PATH environment variable from the environment, you must include the path to the command.
Start a shell with only the SHELL and PATH environment variables:
env -i SHELL=/bin/sh PATH=/bin:/usr/bin sh
Start a daemon process with no environment:
env -i /bin/cron
When a command is specified on the command line, the env utility attempts to exec() into that command. If the command is successfully launched, the exit status from env is that of the program it exec()ed into. Otherwise, env returns an exit status as follows: