---
name: "printenv"
section: "1"
platform: "openbsd"
package: "man"
version: "8.0-current-20261101"
release: "OpenBSD 8.0-current (2026-11-01)"
platforms: ["linux", "freebsd", "openbsd", "macos"]
url: "https://new.carta.tech/printenv"
---

# printenv(1)

print out the environment

## NAME

**printenv** – print out the environment

## SYNOPSIS

**printenv** \[*name*\]

## DESCRIPTION

**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.

## SEE ALSO

[csh(1)](/csh/1.md), [sh(1)](/sh/1.md), [environ(7)](/environ/7.md)

## HISTORY

The **printenv** command first appeared in 2BSD.

## AUTHORS

Bill Joy, February 1979.
