lunes, 7 de mayo de 2012

Configure sudo to install applications behind a proxy

To use a proxy from the linux shell you need to configure the http_proxy environment variable with

 http_proxy="http://username:password@host:port"  
 export http_proxy  

To maintain this environment variable when using the sudo command do the following:

 sudo visudo  

Add this lines to the end of the file:

 Defaults    env_reset  
 Defaults    env_keep = "http_proxy"  

Save and exit and that's all.

No hay comentarios:

Publicar un comentario