Shell and Environment

printenv

Prints environment variables.

printenv displays environment variables or selected variable values.

Syntax
printenv [variable]

Arguments explained

  • Options adjust output or behavior.
  • Arguments name the files, services, hosts, or values the command should work with.

Common examples

Show all environment variables
printenv

Prints the current environment.

Show PATH
printenv PATH

Prints only the PATH variable.

printenv Command
FieldDetails
Commandprintenv
CategoryShell and Environment
Primary usePrints environment variables.
Syntaxprintenv [variable]