You can support us by downloading this article as PDF from the Link below. Download the guide as PDF

How can I configure System wide proxy settings on CentOS 8/7 or Fedora 32/31/30/29 or RHEL 8/7 Linux machine?. Our guide will discuss how you can configure access to internet via proxy server on a Linux machine. This will include the use of wget, lynx, or curl utilities from a command line as well as package management tools.

Configure System-Wide Proxy settings on Desktop UI

For users running a Desktop environment on Fedora / CentOS and RHEL Linux, changes can be made on the system control panel.

Navigate to Settings > Network > Network Proxy

configure proxy settings fedora centos 01

Select “Manual” to input proxy settings.

configure proxy settings fedora centos 02

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.

Proxy on Firefox Browser

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

setup proxy gui firefox

Configure Proxy settings and click “OK” to save.

Configure 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 vi /etc/profile

Add your proxy settings.

# set proxy config via profie.d - should apply for all users

export http_proxy="$PROXY_URL"
export https_proxy="$PROXY_URL"
export ftp_proxy="$PROXY_URL"
export no_proxy=",localhost"

# For curl
export NO_PROXY=",localhost"


  • is the proxy server ip, can be replaced with hostname
  • 8080 is the proxy server port

If authentication is required, the syntax is:

http://username:[email protected]:proxyport/

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

$ source /etc/profile


$ env | grep -i proxy

Set proxy for YUM|DNF package manager

The above settings will work for Applications and command-line tools but not for YUM and DNF package management tools.

For DNF – Fedora / CentOS/RHEL 8

$ sudo vim /etc/dnf/dnf.conf

# Add

For CentOS 6/7:

$ sudo vim /etc/yum.conf

For RHEL users, you’ll also need to set Proxy for accessing RHSM content:

$ sudo vi /etc/rhsm/rhsm.conf
# Configure
proxy_hostname =
proxy_port = 8080

If your proxy server requires authentication, also set

# user name for authenticating to an http proxy, if needed
proxy_user =

# password for basic http proxy auth, if needed
proxy_password =

That’s the basic settings you’ll need to use proxy server to access internet on CentOS/RHEL 7&8 and on Fedora Linux machines.

For Ubuntu/Debian, check:

How To Set System Wide Proxy on Ubuntu / Debian Linux

You can support us by downloading this article as PDF from the Link below. Download the guide as PDF