Configure proxy for APT

为apt-get设置代理

vim /etc/apt/apt.conf

APT configuration file method

This method uses the apt.conf file which is found in your /etc/apt/ directory. This method is useful if you only want apt-get (and not other applications) to use a http-proxy permanently.

On some installations there will be no apt-conf file set up. Edit apt-conf file (or create a new one if you have no one yet) using the editor of your choice.

sudo nano /etc/apt/apt.conf
Add this line to your /etc/apt/apt.conf file (substitute your details for yourproxyaddress and proxyport).

Acquire::http::Proxy “http://yourproxyaddress:proxyport”;
Save the apt.conf file.

If your proxy needs a login/password, substitute:

“http://yourproxyaddress:proxyport”;
with:

“http://username:password@yourproxyaddress:proxyport”;
using username and password from the proxy server.

0
如无特殊说明,文章均为本站原创,转载请注明出处
  • 转载请注明来源:Configure proxy for APT
  • 本文永久链接地址:http://www.hongxiaowei.com/xiaowei/800.html

该文章由 发布

这货来去如风,什么鬼都没留下!!!