Ubuntu设置proxy代理
2021-03-30 本文已影响0人
喵小七的喵
在python环境变量中添加代理
sudo gedit ~/.bashrc
#末尾添加
export http_proxy="http://proxyaddress:port"
export https_proxy="https://proxyaddress:port"
export ftp_proxy="ftp://proxyaddress:port"
source ~/.bashrc
为apt-get添加代理
sudo gedit /etc/apt/apt.conf
#末尾添加
Acquire::http::proxy "http://proxyaddress:port/";
Acquire::ftp::proxy "ftp://proxyaddress:port/";
Acquire::https::proxy "https://proxyaddress:port/";