To allow the Advanced Packaging Tool, or just APT for friends to do its job when the box is behind a proxy, we can use one of the following options.
From the command line (this will only work for the session we are working on):
export http_proxy=http://username:password@server:port |
Or if the proxy does not require a username:
export http_proxy=http://server:port |
Another option is to add the following line into the file /etc/apt/apt.conf (note the semicolon at the end):
Acquire::http::Proxy "http://username:password@server:port"; |