Categories
Linux

How to use proxy server from Linux terminal

In Linux/Unix there is an environment variable called “http_proxy” which can be configured for text based internet sessions.  This variable is used by wget, curl, lynx etc.

How to set http_proxy variable

Type the following command to set proxy server

#export http_proxy=http://10.99.2.197:8080

 How to set the http_proxy variable globally

#vi /etc/profile

add the following lines.

#export http_proxy=http://10.99.2.197:8080

 How to I use a password protected proxy while using command line internet

#curl --proxy-user <username>:<password> www.technix.in