Back to the command reference

printenv

ShellFundamentals In simulator In real Linux

Print environment variable values

Name: printenv = print environment

You can practise it right away in the simulator, and use it in real Linux mode too.

Description

printenv prints all or selected environment variables. It shows only exported variables, not plain shell variables.

Syntax

printenv [VARIABLE]...

Examples

  • $ printenv HOME

    Show your home directory

    Explain
  • $ printenv

    Show all variables

    Explain

Related