码迷,mamicode.com
首页 > 其他好文 > 详细

关于sources.list和apt-get [转载]

时间:2014-08-01 22:50:22      阅读:209      评论:0      收藏:0      [点我收藏+]

标签:style   http   color   java   strong   io   文件   art   

个人觉得,Debian最大的方便在于用apt-get安装软件,apt-get的工作原理大概是这种:/etc/apt/sources.list文件中保存着一些server的设置,在这些server上有大量的能够用于Debian的软件,比方我的sources.list是这个样子(为了简洁,这里先不介绍怎样用vi编辑这个文件,在文章末尾会提到):
deb ftp://ftp.tsinghua.edu.cn/mirror/debian/debian unstable contrib main non-free
deb http://mirror.dlut.edu.cn/debian unstable main contrib non-free
deb http://mirror.dlut.edu.cn/debian-non-US unstable/non-US main contrib non-free
deb http://mirror.dlut.edu.cn/debian-security stable/updates main
deb http://debian.ustc.edu.cn/debian sid main non-free contrib
deb-src http://debian.ustc.edu.cn/debian sid main non-free contrib
deb http://debian.ustc.edu.cn/debian-non-US sid/non-US main non-free contrib
deb http://debian.ustc.edu.cn/debian-uo sid marillat java misc ustc
假设你是教育网用户,就能够把这些放在自己的sources.list里面;假设你是公众网用户,那么您可能须要向别的网友询问适合自己的server。

保存好自己的sources.list之后,我们须要以root身份执行一下apt-get update,这个命令的作用是让apt去sources.list中列出的server上下载一些信息到本地缓冲,这些信息使apt知道哪个server上有哪些软件,版本号各自是什么,以后每次更改sources.list之后最好都执行一次apt-get update,使得更改生效。

安装软件用的命令是apt-get install,比方安装lumaqq(luma用java写的QQ),命令就是apt-get install lumaqq,没错,就是这么简单,全然不必沉浸于./configure,make,make install的苦海其中。

apt还有一个经常用法就是apt-cache search xxx,这个命令会在本地缓冲里查找和xxx有关的软件。

关于sources.list和apt-get [转载],布布扣,bubuko.com

关于sources.list和apt-get [转载]

标签:style   http   color   java   strong   io   文件   art   

原文地址:http://www.cnblogs.com/mfrbuaa/p/3885801.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!