For enhancing security most of organization’s, companies and institution’s uses proxy server on there network for accessing internet. Using proxy server they have restrict access level for each user on basis of there requirement.
In this article you will learn to how to enable http proxy for user in Linux while we have terminal access only.
Enable HTTP Proxy
Login to user on your Linux system for which you want to enable http proxy. Now edit .bashrc or .bash_profile in there home directory and append following lines at the end of file.
For Anonymous Proxy
http_proxy=http://10.0.0.2:8080 export no_proxy=localhost,127.0.0.1 export http_proxy
For Authenticated Proxy
http_proxy=http://proxyuser:[email protected]:8080 export no_proxy=localhost,127.0.0.1 export http_proxy
Now save file and reload configuration file using following command. Or you can simply logout and re login to terminal to enable settings.
$ source ~/.bashrc $ source ~/.bash_profile