Using apt-get over a proxied Internet connection. This is easy.

Posted: August 21, 2012. At: 5:05 PM. This was 5 years ago. Post ID: 4466
Page permalink.
WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters. These cookies expire two weeks after they are set.

How to use the Debian apt command over the Internet through a proxy.

South Park computer guy.
South Park computer guy.

If you wish to use the apt-get command on Linux and you are behind a proxy like at a college, then this simple tweak will take care of this issue. Use the sudo touch /etc/apt/apt.conf command to create the apt configuration file and then add this line to it and edit it with your proxy details. Then the apt-get command will work perfectly.

The line to add to /etc/apt/apt.conf.

Acquire::http::proxy "http://Myusername:[email protected]:8080/";

Another way is to set the proxy temporarily at the command line like this in an environment variable. This will be lost when the terminal window is closed.

export http_proxy='http://Myusername:[email protected]:8080/'

This will set the http_proxy environment variable to the value defined above and the sudo apt-get command will then work. I tried this on Linux Mint 15 and I did not need to set the http_proxy value as root.

How to set the proxy settings for YUM on Centos:

How to enable the proxy for OpenSUSE:

Proxy support for Mandriva Linux:

How to add the proxy settings on FreeBSD 10.0.

If you are using FreeBSD 10.0 and the tcsh shell; use this command to enable the proxy.

setenv http_proxy 'http://John.Smith:[email protected]:8080/'

I just used this in VMware and it worked a treat.

Linux inside.

No comments have been made. Use this form to start the conversation :)

Leave a Reply