Env: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 8: Line 8:
=Overview=
=Overview=


Run a command with a modified environment.
Run a command with a modified environment, or just print the environment if no argument is provided.


  /usr/bin/env [''utility'']
  /usr/bin/env [''utility'']


  /usr/bin/env bash
  /usr/bin/env bash
 
=Standalone Use=
=Standalone Use=



Revision as of 23:44, 2 May 2023

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

Standalone Use

Displays environment values.

Use on the Shebang Line

https://www.baeldung.com/linux/bash-shebang-lines

The env command works by instructing the system to look for the specified interpreter through the PATH variable and use the first occurrence found.