Edit your /etc/bash.bashrc file as root.
Put these line at the end of your /etc/bash.bashrc file :
export http_proxy=http://username:[email protected]:port/ export ftp_proxy=http://username:[email protected]/
也可以直接再terminal中执行export语句;
或者:
修改配置文件:
/etc/apt/apt.conf
添加内容:
Acquire::http::proxy "http://server:port/";
Acquire::ftp::proxy "ftp://server:port/";
Acquire::https::proxy "https://server:port/";