env Command

The env command lets you work with environment variables.

This page discusses:

User Level

System Administrator

Syntax

The command uses this syntax.

[set|get|unset|exists|listnames|clear] env;

To define an environment variable:

set env [global] NAME VALUE;

The global keyword indicates a global variable.

To retrieve an environment variable:

get nev [global] NAME;

To unset an environment variable:

unset env [global] NAME;

To list the defined environment variables:

[list|listnames] env [global];

To clear all environment variables:

clear env;