Name

printenv — stdin  stdout  - file  -- opt  --help  --version

Synopsis

printenv [environment_variable]

The printenv command prints all environment variables known to your shell and their values:

printenv
HOME=/Users/smith
MAIL=/var/spool/mail/smith
NAME=Sandy Smith
SHELL=/bin/bash
...

or a specified variable:

printenv HOME
/Users/smith

Get Macintosh Terminal Pocket Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.