三种方法
-o选项
# sudo apt-get -o Acquire::http::proxy="http://127.0.0.1:8080/" update
# vi /etc/apt/apt.conf
Acquire::http::proxy "http://127.0.0.1:8080/";
Acquire::ftp::proxy "ftp://127.0.0.1:8080/";
Acquire::https::proxy "https://127.0.0.1:8080/";
环境变量
据说9.10以前版本才支持
export http_proxy=http://127.0.0.1:8080
原文链接:https://www.f2er.com/ubuntu/352802.html