Add static proxy as Env Variable in CentOS / RedHat


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

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

PATH in Linux

Path via Clearly Creative

Path is an important area to understand when it comes to Unix / Linux.

What is PATH ?

It is an enviornmental variable in Unix / Linux that tells the shell which directories to search for executable files in response to commands issued by the user. Enviornmental variables are items for which values can be changed.

There are two types of PATH

1. Absolute Path

An abosolute path is easily recognized from the leading forward slash “/”. You start at the top level directory and continue down.

for e.g cd /boot/grub

2. Relative Path

A relative path doesn’t have a preceeding slash, usage of relative path is when you start from directory below the top level. This is dependent on where you are in the filesystem.

for e.g. While being in user’s home directory, going to /user/music you just type cd music

Note. My words are covered with my research therefore some might contain to some reference.