| Dieser Inhalt in deutsch |

Debian - /etc/apt.conf

Problem

The computer has to get data via a proxy server from the Internet in order to import software updates. However, no connection can be established, because the system does not know that it should use a proxy, which username, password and port number are to use.

Solution

Create a configuration file

# touch /etc/apt/apt.conf

Contents of file

Acquire::http::Proxy "http://proxyusername:proxypassword[at]123.123.123.123:3128/";

Explanation

proxyusername = name of the user wchich may use proxy
proxypassword = the users password
[at] = @
123.123.123.123 = ip-address of proxy
3128 = Portnumber of proxy, this one belongs to squid

Update datebase

# apt-get update

Install new updates

# apt-get upgrade

Both commands in one line

# apt-get update && apt-get upgrade