in Unix / Linux

Add static proxy as Env Variable in CentOS / RedHat

PROXY

PROXY

My office environment like many others are providing us Internet via proxy, on Windows Machine/Servers as they are part of domain the policy is pushed and as you login with your domain account you will find it available.

However on Linux servers I always go ahead with doing the following:

export http_proxy=http://proxy.blah.blah:80

And whenever the servers were required to reboot the proxy used to wipe out.

This time I made sure to make it static and plan to push it via Ansible to all the Linux babies I love.

Logged in from root account:

vim /etc/environment
http_proxy=http://proxy.blah.blah:80

Save the file – Re-initialize the shell or logout and login back. You will not have to re-add it back again.

To verify the variable

echo $http_proxy

This site uses Akismet to reduce spam. Learn how your comment data is processed.