printenv(1)

printenv1

Print out the environment

Usage

printenv [name]

Overview

printenv prints out the names and values of the variables in the environment, with one name/value pair per line. If name is specified, only its value is printed.

Exit status

If a name is specified and it is not defined in the environment, printenv returns exit status 1, else it returns status 0.

Releases

61 releases since OpenBSD 2.1; the text changed 6 times.

  1. 2.1–2.3
  2. 2.4–2.6
  3. 2.7–3.3
  4. 3.4–4.1
  5. 4.2–4.8
  6. 4.9–5.0
  7. 5.1–8.0

History

The printenv command first appeared in 2BSD.

Authors

Bill Joy, February 1979.

From man 8.0-current-20261101 in OpenBSD 8.0-current (2026-11-01). Parsed by carta from the page's mdoc source.