Files
linux.softwareshinobi.com/landing/docs/.recycle/.recycle2/037-the-printenv-command.md
Software Shinobi 7d9171c854
All checks were successful
learn org at code.softwareshinobi.com/linux.softwareshinobi.com/pipeline/head This commit looks good
reworking content
2025-06-19 10:03:08 -04:00

1.1 KiB

The printenv command

The printenv prints the values of the specified environment VARIABLE(s). If no VARIABLE is specified, print name and value pairs for them all.

Examples:

  1. Display the values of all environment variables.
printenv
  1. Display the location of the current user's home directory.
printenv HOME
  1. To use the --null command line option as the terminating character between output entries.
printenv --null SHELL HOME

NOTE: By default, the printenv command uses newline as the terminating character between output entries.

Syntax:

printenv [OPTION]... PATTERN...

Additional Flags and their Functionalities:

Short Flag Long Flag Description
-0 --null End each output line with 0 byte rather than newline.
--help - Display a help message, and exit.