env VAR=value command

Category: Shell & Bash

env VAR=value command

Run a command with a specific environment variable set

Runs a command with a temporary environment variable that only applies to that one command, not your whole session.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.