Linux‎ > ‎

Setting proxy for wget

28th February 2009

GNU Wget is a free software package for Linux//Unix for retrieving files using HTTP, HTTPS and FTP, the most widely-used Internet protocols. It is a non-interactive command line tool, so it can be easily called from scripts, cron jobs, terminals without X-Windows support. More infomation on wget can be obtained from

Sometimes it is necessary to set proxy username & password for wget utility when it is behind a proxy server, how to do that?

All the configuration options of wget utility can be set in wgetrc configuration file , normally it is located at /etc/wgetrc in most of the linux distributions.Add or uncomment the following three lines in the wgetrc file.

     http_proxy = http://proxyusername:password@A.B.C.D:port

     ftp_proxy = http://proxyusername:password@A.B.C.D:port

     ##where A.B.C.D is the IP address of the proxy server and port is the port number used by the proxy server eg:

     use_proxy = on

wget proxy configuration to bypass local addresses

Sometimes it may be necessary to use wget to access resources from internal servers and external internet servers ,but if you have configured wget to go through a proxy server it wont be able to access the internal resources , so it becomes necessary to tell wget to avoid using proxy configurations for internal servers.

Use no_proxy directive for bypassing internal servers ip addresses seperated by commas

eg ; no_proxy =,