Skip to main content

Print values of all or environment variables.

# To display key-value pairs of all environment variables:
printenv

# To display the value of a specific variable:
printenv HOME

# To display the value of a variable and end with NUL instead of newline:
printenv --null HOME