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
printenvShow one variable
printenv PATH
printenv HOME
printenv SHELLThis is useful when troubleshooting scripts that behave differently for different users or services.