- 直接代理
sudo apt-get -o Acquire::socks::proxy="socks://127.0.0.1:8399/" update
sudo apt-get -o Acquire::http::proxy="http://127.0.0.1:8000/" update
- 配置文件
Acquire::http::proxy "http://127.0.0.1:8000/";
cp /etc/apt/apt.conf ~/apt_proxy.conf
Acquire::ftp::proxy "ftp://127.0.0.1:8000/";
Acquire::https::proxy "https://127.0.0.1:8000/";
sudo apt-get -c ~/apt_proxy.conf update