Softpanorama
(slightly skeptical) Open Source Software Educational Society

May the source be with you, but remember the KISS principle ;-)

Softpanorama Search

printenv command

News Books See also Recommended Links

 env

Unix alias command and shell aliases  
Shells Pipes AWK Perl grep find Regex
sort uniq cut tee History Humor Etc

The external printenv command displays your current environment. Your environment consists of variables set to certain values. If you specify an argument, the value of that variable is displayed. If the variable does not exist, printenv does not display anything and returns an exit status of 1. If the variable exists, the exit status is 0.

The printenv command is useful for displaying your current environment. You can display all variables in your current shell environment or display a specific variable. You will need to verify what a certain variable is set to while working on UNIX. One common variable you need to verify if vi fails to work properly is the TERM variable.

 

COMMAND FORMAT

The format of the printenv command follows.

     printenv [ variable ]

Arguments

Only one argument may be passed to the printenv command.

variable The name of a variable which exists in the environment. If no variable name is provided, then all variables defined are displayed.