---
title: "Ubuntu 为apt-get 设置代理"
author: "zydest"
date: "2014-08-08T15:09:36Z"
tags: []
categories: ["操作系统"]
slug: "ubuntu-apt-get"
draft: false
lastmod: "2014-08-08T15:09:36Z"
id: 2101763
url: "https://zydest.iteye.com/blog/2101763"
---

打开/etc/apt/apt.conf文件
Acquire::http::proxy "http://<yourServer>:8080/";
Acquire::https::proxy "https://<yourServer>:8080/";
Acquire::ftp::proxy "ftp://<yourServer>:8080/";
Acquire::socks::proxy "socks://<yourServer>:8080/";

如果你确信你的server名称没问题还是连不上， 试试把server名称换成server的IP地址。