Food Guts - Ingredient Information

Ingredient Lookup


Env Cooking Considerations:

No Cooking Considerations yet. Add some!

Env Storage Considerations:

No Storage Considerations yet. Add some!

Env Substitutions:

No Substitutions yet. Add some!

Env on Wikipedia:

For other uses, see Env (disambiguation). It has been suggested that Shebang (Unix)#Solving shebang problems with the env program be merged into this article or section. (Discuss)

env is a shell command for Unix and Unix-like operating systems. It is used to either print a list of environment variables or run another utility in an altered environment without having to modify the currently existing environment. Using env, variables may be added or removed, and the values of existing variables may be changed.

In practice, env has another common use. It is often used by shell scripts to launch the correct interpreter. In this usage, the environment is typically not changed.


To clear the environment for a new shell:

env - /bin/sh

To launch the X Window application xcalc and have it appear on a different display:

env xcalc

Here is the code of a very simple Python script:

#!/usr/bin/env python print ``Hello World.``

In this example, /usr/bin/env is the full path of the env command. The environment is not altered.

Note that it is possible to specify the interpreter without using env, by giving the full path of the python interpreter. A problem with that approach is that on different computer systems, the exact path may be different. By instead using env as in the example, the interpreter is searched for and located at the time the script is run. This makes the script more portable, but also increases the risk that the wrong interpreter is selected because it searches for a match in every directory on the executable search path.

External links

env: set the environment for command invocation â€“ Commands & Utilities Reference, The Single UNIX® Specification, Issue 7 from The Open Group env -- manual page from GNU coreutils. env(1): run a program in a modified environment â€“ OpenBSD General Commands Manual v â€¢ d â€¢ e Unix command line programs and builtins (more) File system cat Â· cd Â· chmod Â· chown Â· chgrp Â· cksum Â· cmp Â· cp Â· du Â· df Â· fsck Â· fuser Â· ln Â· ls Â· lsattr Â· lsof Â· mkdir Â· mount Â· mv Â· pwd Â· rm Â· rmdir Â· split Â· touch  Â· umask Processes at Â· chroot Â· cron Â· exit Â· kill Â· killall Â· nice Â· pgrep Â· pidof Â· pkill Â· ps Â· pstree Â· sleep Â· time Â· top Â· wait User environment env Â· finger Â· id Â· logname Â· mesg Â· passwd Â· su Â· sudo Â· uptime Â· w Â· wall Â· who Â· whoami Â· write Text processing awk Â· comm Â· cut Â· ed Â· ex Â· fmt Â· head Â· iconv Â· join Â· less Â· more Â· paste Â· sed Â· sort Â· strings Â· talk Â· tac Â· tail Â· tr Â· uniq Â· vi Â· wc Â· xargs Shell programming alias Â· basename Â· dirname Â· echo Â· expr Â· false Â· printf Â· test Â· true Â· unset Networking inetd Â· host Â· netstat Â· ping Â· rlogin Â· netcat Â· traceroute Searching find Â· grep Â· locate Â· whereis Â· which Miscellaneous apropos Â· banner Â· bc Â· cal Â· clear Â· date Â· dd Â· file Â· help Â· history Â· info Â· lp Â· lpr Â· man Â· pax Â· size Â· tee Â· tput Â· type Â· uname Â· whatis Â· yes