How to set proxy for wget? How to set proxy for wget? linux linux

How to set proxy for wget?


For all users of the system via the /etc/wgetrc or for the user only with the ~/.wgetrc file:

use_proxy=yeshttp_proxy=127.0.0.1:8080https_proxy=127.0.0.1:8080

or via -e options placed after the URL:

wget ... -e use_proxy=yes -e http_proxy=127.0.0.1:8080 ...


Type in command line :

$ export http_proxy=http://proxy_host:proxy_port

for authenticated proxy,

$ export http_proxy=http://username:password@proxy_host:proxy_port

and then run

$ wget fileurl

for https, just use https_proxy instead of http_proxy. You could also put these lines in your ~/.bashrc file so that you don't need to execute this everytime.


the following possible configs are located in /etc/wgetrc just uncomment and use...

# You can set the default proxies for Wget to use for http, https, and ftp.# They will override the value in the environment.#https_proxy = http://proxy.yoyodyne.com:18023/#http_proxy = http://proxy.yoyodyne.com:18023/#ftp_proxy = http://proxy.yoyodyne.com:18023/# If you do not want to use proxy at all, set this to off.#use_proxy = on