What does env do?

show the environment, or run a command with a modified one.

▸ Explain your own env command →

env examples, explained

$ env

  • envshow the environment, or run a command with a modified one

$ env -u DEBUG node app.js

  • envshow the environment, or run a command with a modified one
  • -uremove this variable from the environment
  • DEBUGvalue for -u
  • nodean argument passed to the command
  • app.jsan argument passed to the command

env flags & options

-0end each output line with NUL instead of a newline
-istart with a completely empty environment
-uremove this variable from the environment
-Cchange to this directory before running the command

Other commands

Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.