linux printenv command – print all or part of environment
Print the values of the specified environment VARIABLE (s). If no VARIABLE is specified, print name and value pairs for them all.
Syntax
printenv [OPTION]... [VARIABLE]...
Options
- -0, –null
end each output line with NUL, not newline
Examples
Print name and value pairs for all environment variables
➜ ~ printenv
You can also use the env command without parameters to print all the name and value pairs of all environment variables.