ubuntu 10.04 use wget with proxy

Nils Kassube kassube at gmx.net
Thu Apr 15 05:23:46 UTC 2010


alan wrote:
> I have set a http proxy in system, and I can use proxy in firefox。but
>  wget dose not work with proxy, if i use ssh connect  to the system,
>  wget work with proxy very well.  Anybody have same problem?  is this
>  a bug?

There are several ways to convince wget to use a http proxy:

1. You can set the environment variables http_proxy, https_proxy and 
ftp_proxy before you start wget. That would be done in ~/.bashrc if you 
want it set at login time. Don't ask me where to set it if you use 
another shell than bash though.

2. You can use the file /etc/wgetrc to set the proxy system wide. Search 
for "proxy" in that file - there is an example as a comment.

3. You can use a file $HOME/.wgetrc with the same syntax as /etc/wgetrc 
if you want to use your own configuration independent from thy system 
wide config.

And no, it is not a bug, IMHO. I suppose your terminal program doesn't 
read the ~/.bashrc or similar config file where the environment variable 
is set, while your ssh login reads that file. Check it with

echo $http_proxy

in your terminal program and after ssh login.


Nils




More information about the ubuntu-users mailing list