printenv — Print Environment Variables

The printenv command prints environment variables for the current shell session. These variables can affect paths, language settings, application configuration and script behaviour.

Show all environment variables

printenv

Show one variable

printenv PATH
printenv HOME
printenv SHELL

This is useful when troubleshooting scripts that behave differently for different users or services.

Leave a Comment