You are here: >

Linux and Unix printenv command

printenv commandAbout printenv
printenv syntax
printenv examples
Related commands
Linux and Unix main page

About printenv

printenv prints all or part of the environment.

printenv syntax

printenv [OPTION]... [VARIABLE]...

printenv prints the values of the specified environment VARIABLE(s). If no VARIABLE is specified, print name and value pairs for them all.

NOTE: your shell may have its own version of printenv, which usually supersedes the version described here. Please refer to your shell's documentation for details about the options it supports.

-0, --null end each output line with 0 byte rather than newline.
--help display a help message, and exit.

printenv examples

printenv HOME

Display the location of the current user's home directory.

printenv

Display the values of all environment variables.

env — Report the value of environment variables.