On Unix-like operating systems, the printenv command prints all or part of the shell environment.
This page describes the GNU/Linux version of 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.
- Syntax
- Examples
- Related commands
- Linux commands help
Examples
printenv HOME
Display the location of the current user’s home directory.
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.
printenv
Display the values of all environment variables.
Related commands
env — Report the value of environment variables.