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