- Create a new configuration file named proxy.conf.
sudo touch /etc/apt/apt.conf.d/proxy.conf
- Open the proxy.conf file in a text editor.
sudo vi /etc/apt/apt.conf.d/proxy.conf
-
Just like in the first example, create a new file under the /etc/apt/apt.conf.d directory, and then add the following lines.
Acquire { HTTP::proxy "http://127.0.0.1:8080"; HTTPS::proxy "http://127.0.0.1:8080"; }