env

from Wikipedia, the free encyclopedia

env (of English environment , environment ') is a Unix command that either a list of environment variables indicating or another program in a different environment performs without changing the variables of the current environment. Environment variables can be changed, supplemented or deleted using env .

In addition, env can also be used to execute a shell script with the correct interpreter if the exact path to the interpreter is not known. In this case the actual function of env, the work on the environment variables, is not used.

Examples

Calling a new shell with an empty environment:

env - /bin/sh

Calling the X Window application xcalc if it should appear on another screen:

env DISPLAY=foo.bar:1.0 xcalc

A Python script that runs independently of the path of the Python interpreter:

#!/usr/bin/env python3
print("Hallo Welt")

Web links