Ubuntu apt-get proxy

愛吃鹹鴨蛋的喵發表於2020-09-30

1

sudo apt-get -o Acquire::http::proxy=“http://127.0.0.1:12333/” install six

2

修改/etc/apt/apt.conf(或者/etc/envrionment),增加

Acquire::http::proxy “http://127.0.0.1:12333/”;
Acquire::ftp::proxy “ftp://127.0.0.1:12333/”;
Acquire::https::proxy “https://127.0.0.1:12333/”;

3

臨時設定設定環境變數

export http_proxy=http://127.0.0.1:12333
sudo apt-get update

相關文章