Configuring proxy settings in linux



If your Linux box is behind a proxy server then to access the internet, proxy configuration will be required. The 'http_proxy' and 'ftp_proxy' environment variables hold the information about proxy server. Just execute the following commands-

$export http_proxy=http://proxy-server-ip:port
$export ftp_proxy=http://proxy-server-ip:port

Now wget, yum, apt-get etc. can use these variables to access http/s and ftp URLs out of office LAN. If proxy server needs authentication credentials then pass them as shown below-

$export http_proxy=http://user:[email protected]:port
$export ftp_proxy=http://user:[email protected]:port

To avoid executing these commands every time you login or reboot the machine then add them in ~/.bashrc file


Share this

Related Posts

Previous
Next Post »

What do you think about this Article? Add your Opinion..! EmoticonEmoticon