Some of the company's LAN environment, such as our company only allow the use of agents to the Internet, the graphical interface is a good solution to set up the browser agent, but the Linux pure command line interface is .... The following simple steps can be achieved!
First, the command line interface general Proxy setting method
1. Setting the relevant environment variables in the profile file
# Vi/etc/profile
HTTP_PROXY=192.168.10.91:3128 # Specify the proxy address used by HTTP, HTTPS, and FTP protocols respectively https_proxy=192.168.10.91:3128ftp_proxy= 192.168.10.91:3128no_proxy=192.168.10.0. # to access the LAN address (192.168.20.0/24 network segment) without using a proxy, you can separate multiple addresses with commas export http_proxy https_proxy ftp_proxy no_proxy
Save exit, Log off and re-login system to take effect .
Now the agent on the Internet is no problem, if the use of Debian system to use apt-get what to do?
Three ways:
1. Temporary settings let Apt-get use proxy
Enter export Http_proxy=http://yourproxyaddress:proxyport directly from the command line
2. Permanent settings
Edit/etc/apt/apt.conf file, add at the end of the file
Acquire::http::P Roxy "Http://yourproxyaddress:proxyport
Some systems install without apt.conf files need to be manually established, this method is only to set the agent for Apt-get
3. Set up proxies for apt and other applications, such as wget
Edit the. bashrc file and add it at the end of the file
Http_proxy=http://yourproxyaddress:proxyport
Export Http_proxy Save the file and exit the re-login setting takes effect.
Http://www.cnblogs.com/AloneSword/p/3394806.html
Implement proxy online in Linux command line mode (GO)