HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

printenv — Print values of environment variables. More information: <https://www.gnu.org/software/coreutils/man

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandprintenvvaluescliprintenvironmentvariablesmore

Problem

How to use the printenv command: Print values of environment variables. More information: <https://www.gnu.org/software/coreutils/manual/html_node/printenv-invocation.html>.

Solution

printenv — Print values of environment variables. More information: <https://www.gnu.org/software/coreutils/manual/html_node/printenv-invocation.html>.

Display key-value pairs of all environment variables:
printenv


Display the value of a specific variable:
printenv {{HOME}}


Display the value of a variable and end with NUL instead of newline:
printenv {{[-0|--null]}} {{HOME}}

Code Snippets

Display key-value pairs of all environment variables

printenv

Display the value of a specific variable

printenv {{HOME}}

Display the value of a variable and end with NUL instead of newline

printenv {{[-0|--null]}} {{HOME}}

Context

tldr-pages: common/printenv

Revisions (0)

No revisions yet.