env

Display, set, or remove environment variables, Run a command in a modified environment

SYNTAX
     env [OPTION]... [NAME=VALUE]... [COMMAND [ARGS]...]

OPTIONS

  -u NAME
  --unset=NAME
       Remove variable NAME from the environment, if it was in the
       environment.

  -
  -i
  --ignore-environment
       Start with an empty environment, ignoring the inherited
       environment.

Arguments of the form `VARIABLE=VALUE' set the environment variable VARIABLE to value VALUE.

VALUE may be empty (`VARIABLE='). Setting a variable to an empty value is different from unsetting it.

The first remaining argument specifies the program name to invoke; it is searched for according to the `PATH' environment variable. Any remaining arguments are passed as arguments to that program.

If no command name is specified following the environment specifications, the resulting environment is printed. This is like specifying a command name of `printenv'.

Related commands:

function - Define Function Macros
hostname - Print or set system name
id - Print user and group id's
local - Create variables
logname - Print current login name
printenv - Print environment variables
readonly - Mark variables/functions as readonly
set - Manipulate shell variables and functions
shift - Shift positional parameters
shopt - Shell Options
uname - Print system information
users - Print login names of users currently logged in
unset - Remove variable or function names
who - Print who is currently logged in

Equivalent Windows NT commands:

SET - Display, set, or remove Windows NT environment variables
SETX - Set environment variables permanently
SETLOCAL - Begin localisation of environment changes in a batch file



Back to the Top

Simon Sheppard
SS64.com