Linux: Using apt-get behind a http/ftp proxy

You need to create a file /etc/apt/apt.conf with the following content:


For FTP:

You need root permissions to create/edit that file, but for using apt-get you already do so.

Bash: Set HTTP / FTP Proxy with Username and Password

You can set a HTTP Proxy for the CURRENT BASH with this command:

A FTP Proxy can be set like this:

With username and password it looks like this:

You can unset it with this commands:

Maybe use telnet to check if your proxy is reachable:

Press CTRL-C to abort if necessary.