How to run “sudo apt-get update” through proxy in commandline?

How to run “sudo apt-get update” through proxy in commandline?

  • In my office I want to update and download through wget and here they are using a proxy. How can I get wget to use the proxy from the command-line?

  • Answer:

    Either export the http_proxy environment variable as in export http_proxy=http://myproxy:port or add Acquire::http::proxy "http://MYNAME:[email protected]:MYPORT" To /etc/apt/apt.conf. See http://ubuntuforums.org/showthread.php?t=96802

Renjith G at Unix and Linux Visit the source

Was this solution helpful to you?

Other answers

If your machine is behind a proxy running a Microsoft NTLM based web proxy you may need something like the (python based) http://ntlmaps.sourceforge.net/ to sit between wget/apt-get and the real proxy to do the authentication for you.

Frozenskys

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.