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

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