Env Command in Linux














































Env Command in Linux



The env command of Linux is used to print environment variables. It is also used to run a utility or command in a custom environment.
Syntax:


1. env without any options: The env command on its own prints out all the environment variables.


2. env - i: This command runs the command in an empty environment. It basically clears out the existing environment before running the command.
Syntax:


Example:


3. env -u: This command removes a variable from the current environment.
Syntax:


Example:


4. env --version: This command displays the version information of the environment.
Syntax:


Example:


5. env --help: Displays all the help information associated with the env command (i.e. the environment).
Syntax:


Example:


Comments