Here we will examine how to set system proxy settings on Ubuntu 20.04/18.04 / Debian 10 system. A proxy server, at its basic level, is a computer system with services that sits between computers making web requests (clients) and the servers containing the content being requested for (servers).

There are various ways of configuring Proxy settings on Ubuntu / Debian operating systems. The graphical interface can be used, or all settings are done on the command line. In this guide, we will consider both methods.

Set System-Wide Proxy settings on GUI

For users running a Desktop edition of Ubuntu / Debian OS, changes can be made on the system control center.

on Debian: Settings > Network > Network Proxy > Manual

setup proxy gui debian

on Ubuntu: Settings > Network > Network Proxy > Manual

setup proxy gui ubuntu

Populate proxy values for http, https, and ftp. If you have SOCKS proxy, also set it accordingly. Once changes are saved, the system will pick them automatically.

If you have Firefox browser, you need to update proxy settings under Preferences > Network Settings > Manual Proxy configuration.

setup proxy gui firefox

Configure Proxy and click “OK” to save.

Set System-Wide Proxy settings on CLI

We will add a shell script file under /etc/profile.d/ This will ensure the settings apply to all logged-in users.

sudo nano  /etc/profile.d/

Populate your proxy values.

# set proxy config via profie.d - should apply for all users
export http_proxy=""
export https_proxy=""
export ftp_proxy=""
export no_proxy=",localhost"

# For curl
export HTTP_PROXY=""
export HTTPS_PROXY=""
export FTP_PROXY=""
export NO_PROXY=",localhost"

Add other IPs you want to exclude from proxy to NO_PROXY & no_proxy environment variable.

Make it executable.

sudo chmod +x  /etc/profile.d/

Source the file to start using the proxy settings, or alternatively logout and back in.

$ source /etc/profile.d/


$ env | grep -i proxy

Set proxy for APT package manager

The above settings will work for Applications and command-line tools. If you want to set proxy only for the APT package manager, configure like below.

$ sudo nano /etc/apt/apt.conf.d/80proxy

Acquire::http::proxy "";
Acquire::https::proxy "";
Acquire::ftp::proxy "";

Replace with the correct IP address for your proxy servers. If Authentication is required, set like this.

Acquire::http::proxy "http://<username>:<password>@<proxy>:<port>/";
Acquire::https::proxy "https://<username>:<password>@<proxy>:<port>/";
Acquire::ftp::proxy "ftp://<username>:<password>@<proxy>:<port>/";

Set Proxy for wget only

To set proxy settings for use with wget command, add them to ~/.wgetrc file.

$ vim ~/.wgetrc                           
use_proxy = on
http_proxy = 
https_proxy = 
ftp_proxy = 

That is how easy it can be to configure system-wide proxy settings on Debian / Ubuntu server or Desktop. You can also check related articles on the links below.

Types of Proxy Servers

How to setup Squid proxy on Ubuntu / CentOS 7

Grafana behind Nginx and Apache Proxy

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!

As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.


Please enter your comment!
Please enter your name here