printenv command in UNIX
printenv [OPTION]... [VARIABLE]...Introduction
Section titled “Introduction”Print the values of the specified environment VARIABLE(s).
If no VARIABLE is specified, print name and value pairs for them all.
Options
Section titled “Options”The only option is:
-0,--null: end each output line withNUL, not newline (\n)
It also has --help and --version options, like all the commands.
Note that your shell may have its own version of printenv, which usually supersedes the version described here.
Please refer to your shell’s documentation.
Examples
Section titled “Examples”# print the list of environmental variablesprintenvSHELL=/bin/bashHOME=/home/pit# many others
# print only certain variablesprintenv USER HOMEpit/home/pitQuotes
Section titled “Quotes”Manual reference: