You get a bonus - 1 coin for daily activity. Now you have 1 coin

Debian: Using aptitude (apt-get) Through a Proxy Server

Practice



Those who work with Linux Debian are no strangers to the aptitude system (or its derivative, the apt-get utility). Among other things, this system reaches out to the internet to sync its package lists and download installation files.

Now let's imagine a situation where it has to do this through a proxy server, and when the OS was installed we didn't know about that and didn't set the corresponding option.


Here I'll show you how to make aptitude (apt-get) go online through a proxy.


Go to /etc/apt/apt.conf.d and create a file called proxy with the following contents:
Acquire::http::Proxy "http://user:pass@192.168.1.1:8080/";
Acquire::ftp::Proxy "ftp://user:pass@192.168.1.1:8080/";
Acquire::http::Timeout "120";

Here, instead of 192.168.1.1:8080, specify the IP address and port of the proxy server through which the aptitude system should access the internet. Instead of user and pass, specify the login and password for the proxy server.


If no login and password are required, the proxy file will look like this:
Acquire::http::Proxy "http://192.168.1.1:8080/";
Acquire::ftp::Proxy "ftp://192.168.1.1:8080/";
Acquire::http::Timeout "120";

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "LINUX operating system"

Terms: LINUX operating system