Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Environment

&pagelevel(4)&pagelevel

The environment of a process consists of a list of name=value pairs that is passed to an executed program in the same way as a normal argument list. The names must be POSIX shell-style identifiers; the values must be character strings (including the null string).

The POSIX shell interacts with the environment in several ways. On invocation, the shell scans the environment and creates a variable for each name found, giving it the corresponding value and marking it for export. Executed commands inherit the environment. If the user modifies the values of these variables or creates new ones using the export or typeset -x commands, they become part of the environment. The environment seen by any executed command is thus composed of any name=value pairs originally inherited by the shell, whose values may be modified by the current shell, plus any additions that have been marked in export or typeset -x commands.

The environment for any simple command or function may be augmented by prefixing it with one or more variable assignments. A variable assignment argument is a word of the form identifier=value.

command sees the following lines as equivalent:

TERM=450 command arguments

( export TERM ; TERM=450 ; command arguments )

If the -k option was set on POSIX shell invocation or with the built-in set command, all variable assignment arguments are exported to the environment, even if they occur after the command name.