大约sources.list和apt-get [转载]

个人觉得,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相关软件。

原文地址:https://www.cnblogs.com/lcchuguo/p/4562869.html