sudo apt-get install software-name -o Acquire::http::proxy="http://用户名:密码@代理服务器IP:代理服务器端口"
如果不需要用户名和密码使用如下方式:
sudo apt-get install software-name -o Acquire::http::proxy="http://代理服务器IP:代理服务器端口"
-o 表示代理设置,可以不用配置文件方式
转载于:https://www.cnblogs.com/zle1992/p/9087460.html