Env
Jump to navigation
Jump to search
External
Internal
Overview
Run a command with a modified environment, or just print the environment if no argument is provided.
/usr/bin/env [utility]
/usr/bin/env bash
No Argument Use
Displays environment values.
Modify the Environment to Run a Command
env SOME_VAR='some value' printenv
will display, among other environment variables, SOME_VAR.
Use on the Shebang Line
The env
command works by instructing the system to look for the specified interpreter through the PATH
variable and use the first occurrence found.