0.前言
    通过改动ubuntu软件源可提高apt命令下载安装软件的速度。
    參考资料
    【官方资料】——配置文件改动方法
    【Ubuntu如何改动软件源地址】——使用ubuntu软件中心改动(推荐)
1.使用ubuntu软件中心更新
    请參考【Ubuntu如何改动软件源地址】——来自百度经验
图1 打开软件和更新
图2 选择国内软件源
2.使用指令方法改动
【1】首先备份源列表
sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
【2】gedit打开 并替换全部内容
sudo gedit /etc/apt/sources.list
【2.1】 若ubunt版本号为13.04
【163源】
deb http://mirrors.163.com/ubuntu/ raring main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ raring-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ raring-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ raring-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ raring-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ raring main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ raring-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ raring-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ raring-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ raring-backports main restricted universe multiverse
【阿里云源】

deb http://mirrors.aliyun.com/ubuntu/ raring main restricted universe multiverse 

deb http://mirrors.aliyun.com/ubuntu/ raring-security main restricted universe multiverse 
deb http://mirrors.aliyun.com/ubuntu/ raring-updates main restricted universe multiverse 
deb http://mirrors.aliyun.com/ubuntu/ raring-proposed main restricted universe multiverse 
deb http://mirrors.aliyun.com/ubuntu/ raring-backports main restricted universe multiverse 
deb-src http://mirrors.aliyun.com/ubuntu/ raring main restricted universe multiverse 
deb-src http://mirrors.aliyun.com/ubuntu/ raring-security main restricted universe multiverse 
deb-src http://mirrors.aliyun.com/ubuntu/ raring-updates main restricted universe multiverse 
deb-src http://mirrors.aliyun.com/ubuntu/ raring-proposed main restricted universe multiverse 
deb-src http://mirrors.aliyun.com/ubuntu/ raring-backports main restricted universe multiverse

【2.2】 若ubuntu版本号为12.04
将上述列表地址中的 raring 替换为 precise 就可以 
【3】刷新列表
sudo apt-get update
【3.1】若运行apt-get update产生错误

【错误现象】

    E: Could not get lock /var/lib/apt/lists/lock - open (11 Resource temporarily unavailable)
    E: Unable to lock the list directory
    【错误原因】可能为之前操作使用ctrl+c强制退出apt-get 指令。而实际apt-get进程依旧存在。
    【解决方法】
    【a】查看进程(使用grep指令过滤其它进程)
    ps -e | grep apt
    【b】apt-get进程依旧存在
    6362 ? 00:00:00 apt
    6934 ? 00:00:00 apt-get
    【c】销毁进程
    sudo killall apt
    sudo killall apt-get
    【d】又一次运行
    sudo apt-get update

Linux学习笔记——Ubuntu更新软件源的更多相关文章

  1. ubuntu 更新软件源

    ubuntu 更新软件源 修改文件sources.list 位于/etc/apt/sources.list,并备份原文件为sources.list.bak deb http://mirrors.163 ...

  2. ubuntu更新软件源

    更新源方法: 1. 打开终端.单击主菜单中的“应用程序 - 附件 - 终端”. 2. 修改更新服务器列表.请在终端中执行下面的两条命令: sudo cp /etc/apt/sources.list / ...

  3. Linux学习笔记 | 将默认镜像源修改为国内镜像源

    前言: 在使用Linux操作系统的时候,难免会下载各种安装包,而Linux使用的下载源服务器属于国外,下载速度相对国内会慢很多,像日常使用的阿里云和腾讯云等国内服务器厂商,镜像源都默认为自己相关的镜像 ...

  4. Linux学习笔记:常用软件

    Linux系统下常用软件(针对CentOS,其他系统类似) lrzsz 可用于上传和下载,安装 yum -y install lrzsz ,使用 上传 rz 下载 sz mysql 安装 yum -y ...

  5. Ubuntu更新软件源出现GPG error

    原因 在sources.list文件中加入了非ubuntu官方源,所以认为加入源是不可信任的. 解决方法导入该源公钥.E084DAB9为PUBKEY后八位 gpg --keyserver keyser ...

  6. ubuntu中安装samba 分类: linux 学习笔记 ubuntu 2015-07-07 16:14 46人阅读 评论(0) 收藏

    为了方便的和Windows之间进行交互,samba必不可少. 当然,他的安装使用也很简单: 安装: sudo apt-get install samba sudo apt-get install sm ...

  7. linux中的帮助命令 分类: linux 学习笔记 ubuntu 2015-07-05 19:07 31人阅读 评论(0) 收藏

    说实话,到目前为止我还是不太习惯使用linux自带的帮助文档,遇到问题都是去查我自己下载的chm格式的命令大全,不过这些帮助命令我们还是有必要了解的. 1.man [要查看的命令名称] 例如想要查看l ...

  8. ubuntu常用文件搜索命令 分类: linux 学习笔记 ubuntu 2015-07-05 15:40 84人阅读 评论(0) 收藏

    1.find find [搜索路径] [搜索关键字] 比如查找/test中文件名为t5.tmp的文件: 查找根目录下大于100M的文件 注意,这里的204800单位是块,1块=512字节 在根目录下查 ...

  9. Linux学习笔记 | 配置ssh

    目录: SSH的必要性 将默认镜像源修改为清华镜像源 Linux安装ssh软件 使用putty软件实现ssh连接 Windows下安装winscp SSH的必要性 一般服务器都位于远程而非本地,或者及 ...

随机推荐

  1. Linux下禅道系统的搭建

    说明: 禅道系统的搭建,分两大部分 1.xampp环境的搭建 2.禅道系统的搭建 *********************************************************** ...

  2. php远程获取图片或文件信息(get_headers,fsocketopen,curl)

    <?php if(!function_exists("remote_filesize")){ /** * 获取远程或本地文件信息 * @param string $strUr ...

  3. 【ButterKnife】 安卓程序猿的一大利器

    注:近期才看到的这个类库,来自于jakewharton大神的力作,安卓里面的视图注入库 另小弟水平有限,翻译的不好,还请多多指正 首先是地址(托管在github上):http://jakewharto ...

  4. The YubiKey -- HOW IT WORKS

    A single YubiKey has multiple functions for protecting access to your email, your apps and your phys ...

  5. IntelliJ IDEA使用教程三 SVN的集成与使用

    注意: 虽然IDEA已经集成了svn客户端,但还是习惯使用第三方svn客户端,比如: TortoiseSVN. 就是因为使用的是第三方客户端,所以和IDEA集成的时候就出现了一个特别大的坑,因为svn ...

  6. Iterative (non-recursive) Quick Sort

    An iterative way of writing quick sort: #include <iostream> #include <stack> #include &l ...

  7. 利用nginx加速web访问

    起因---------- 在最近新系统的设计中对于首页打开速度的问题做了一些考虑,由于页面上还是以动态数据为主,所以简单的静态化数据可能并不行,所以需要从业务和技术结合的角度去考虑这个问题.由于有些数 ...

  8. dao层的泛型实现(2种方法)

    一: package com.wzs.test2.dao; import java.util.List; public interface CommonDAO { public <T> v ...

  9. CRF 及CRF++ 安装与解释

    CRF简介 Conditional Random Field:条件随机场,一种机器学习技术(模型) CRF由John Lafferty最早用于NLP技术领域,其在NLP技术领域中主要用于文本标注,并有 ...

  10. Insertion Sort List Leetcode java

    题目: Sort a linked list using insertion sort. 题解: Insertion Sort就是把一个一个元素往已排好序的list中插入的过程. 初始时,sorted ...