---
title: "ubuntu proxy"
author: "liming495"
date: "2014-03-07T09:43:39Z"
tags: []
categories: ["非技术"]
slug: "ubuntu-proxy"
draft: false
lastmod: "2014-03-07T09:43:39Z"
id: 2026897
url: "https://liming495.iteye.com/blog/2026897"
---

1.在/etc/apt目录下建立apt.conf文件   

     在命令行模式：sudo touch  /etc/apt/apt.conf 

                   sudo vi /etc/apt/apt.conf 

2.在apt.conf文件中添加如下内容： 

              Acquire::http::proxy  "http://用户名:密码@代理IP地址:端口号"; 

              Acquire::https::proxy  "https://用户名:密码@代理IP地址:端口号"; 

              Acquire::ftp::proxy  "ftp://用户名:密码@代理IP地址:端口号"; 

3.重启电脑，搞定。通过 sudo apt-get update测试下！