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

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

For HTTP:

For FTP:

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