For faster navigation, this Iframe is preloading the Wikiwand page for env.

env

env es un comando del sistema operativo Unix y los sistemas Unix-like. Es usado para mostrar una lista de las variables de entorno y para ejecutar otro programa con las variables de entorno modificadas sin tener que modificar las variables de entorno del equipo. Usando el comando env se pueden añadir y eliminar variables, además de poder modificar el valor de las variables actuales.

En la práctica, el comando env a menudo es utilizado por los scripts del shell para lanzar el intérprete correcto. En este uso las variables de entorno no son modificadas.

Ejemplos

Para limpiar todas las variables del entorno (crear un nuevo entorno sin ninguna variable de entorno) para una nueva shell:

env -i /bin/sh

Para lanzar la aplicación X Window xcalc y hacer que aparezca en una pantalla diferente:

env DISPLAY=foo.bar:1.0 xcalc

Este es el código de un script en Python muy simple:

#!/usr/bin/env python2
print "Hello World."

En este ejemplo, /usr/bin/env es la ruta completa del comando env. El entorno no se altera.

{{bottomLinkPreText}} {{bottomLinkText}}
env
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?