Ubuntu12.04 use apt-get to set proxy

Source: Internet
Author: User
1. Create an apt-Get configuration file using the proxy, the file name is random, I name it as a apt-get-proxy.conf here, put it in ~ Directory. 2. open the file in a text editor such as vim or gedit and enter the following content: acquire: http: proxy "http: // username: password @ Proxy Server IP Address: proxy server port "; acquire: https: proxy" https: // username: password @ Proxy Server IP: proxy server port "; acquire: ftp: proxy" ftp: // username: password @ Proxy Server IP: proxy server port ". Modify the username, password, proxy server IP address, and proxy server port based on the actual situation. If you do not need the username and password, it can be written as follows: acquire: http: proxy "http: // Proxy Server IP: proxy server port"; acquire: https: proxy "https: // Proxy Server IP: proxy server port "; acquire: ftp: proxy" ftp: // Proxy Server IP: proxy server port "; then save it. 3. Open the terminal, input:

Sudo apt-Get install software-name-C ~ Apt-get-proxy.conf

You can. Software-name indicates the software name.-C indicates that the specified configuration file is used ~ /Apt-get-proxy.conf represents the configuration file just created 4, there is a simpler way:
Sudo apt-Get install software-name-o acquire: http: proxy = "http: // User name: password @ Proxy Server IP: proxy server port"
If you do not need a user name or password, use the following method:
Sudo apt-Get install software-name-o acquire: http: proxy = "http: // Proxy Server IP: proxy server port"
-O Represents proxy settings, which can be http://www.cnblogs.com/babykick/archive/2011/03/25/1996004.html without the need to configure files

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.