How to Setup APT Proxy on Ubuntu 22.04 LTS

Published: 21 June 2023
on channel: MivoCloud
2,859
45

A proxy server is an intermediate server that sits between the client computer and the internet. Generally, it is used in internal networks for unexpected access and to prevent attacks. It is also used to control internet access, bandwidth control, and content filtering and blocking.

In this tutorial, we will show you how to set up proxy settings and apt-proxy in Ubuntu 22.04 Server and Desktop system. The same steps are working on Ubuntu 20.04 as well.

Useful Links:
VPS/VDS - https://www.mivocloud.com/

Commands Used:
export HTTP_PROXY=username:password@proxy-server-ip:8181
export HTTPS_PROXY=username:password@proxy-server-ip:8182

nano ~/.bashrc
export http_proxy=username:password@proxy-server-ip:8181
export https_proxy=username:password@proxy-server-ip:8182

source ~/.bashrc

nano /etc/environment
export http_proxy=username:password@proxy-server-ip:8181
export https_proxy=username:password@proxy-server-ip:8182

source /etc/environment

nano /etc/apt/apt.conf.d/proxy.conf
Acquire::http::Proxy "http://username:password@proxy-server-ip:8181/";
Acquire::https::Proxy "https://username:password@proxy-server-ip:8182/";


Watch video How to Setup APT Proxy on Ubuntu 22.04 LTS online without registration, duration hours minute second in high quality. This video was added by user MivoCloud 21 June 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 2,859 once and liked it 45 people.