Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

env

v(uutils coreutils) 0.1.0

Options

--ignore-environment, -i

env-help-ignore-environment

--chdir=<DIR>, -C <DIR>

env-help-chdir

--null, -0

env-help-null

--file=<PATH>, -f <PATH>

env-help-file

--unset=<NAME>, -u <NAME>

env-help-unset

--debug, -v

env-help-debug

--split-string=<S>, -S <S>

env-help-split-string

--argv0=<a>, -a <a>

env-help-argv0

--ignore-signal=<SIG>

env-help-ignore-signal

Examples

Show the environment:

env

Run a program. Often used in scripts after the shebang (#!) for looking up the path to the program:

env {{program}}

Clear the environment and run a program:

env {{[-i|--ignore-environment]}} {{program}}

Remove variable from the environment and run a program:

env {{[-u|--unset]}} {{variable}} {{program}}

Set a variable and run a program:

env {{variable}}={{value}} {{program}}

Set one or more variables and run a program:

env {{variable1=value variable2=value variable3=value ...}} {{program}}

Run a program under a different name:

env {{[-a|--argv0]}} {{custom_name}} {{program}}

The examples are provided by the tldr-pages project under the CC BY 4.0 License.

Please note that, as uutils is a work in progress, some examples might fail.