Implement proxy online in Linux command line mode

Source: Internet
Author: User

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)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.