Ubuntu Apt 包管理器是 Proxy
- 全局设置
修改 /etc/apt/apt.conf
, 添加一行 Proxy 信息
Acquire::http::Proxy "http://[username:password]proxy-host:proxy-port/";
Acquire::http::Proxy "http://192.168.0.120:1080/";
- 临时设置
在 install 命令后追加 Proxy 信息
-o Acquire::http::proxy="http://[username:password]proxy-host:proxy-port/"
sudo apt install vim -o Acquire::http::proxy="http://192.168.0.120:1080/"
End