基 础 篇
0001
Debian 的版本究竟是如何划分的?
Debian 有自己独特的版本系统,整个系统有三个版本,分别为稳定版(stable),测试版(testing)和不稳定版(unstable)。每次发布的版本都是稳定版,而测试版在经过一段时间的测试证明没有问题后会成为新的稳定版。因为稳定版是会更新的,为了便于区分不同时期的稳定版,每个版本又有自己特有的代号(codename),现在的稳定版称为 sarge,测试版称为 etch。而不稳定版的代号永远是 sid。普通用户使用tesing或者unstable都可以
0002
安装方式的选择debian提供了多种安装方式:
a,使用基本系统的netinstall CD(大小100M左右),如debian-31r0a-i386-netinst.iso,刻盘安装,安装之后会得到一个包含基本系统的debian(推荐);
b,使用stable或者testing的CD Image,可以从ftp://ftp.tsinghua.edu.cn/mirror/de...ent/i386/iso-cd 下载,虽然总数有14张之多,但是通常只需要第一张(在unstable和testing里包比较混乱或者网络环境不好的时候使用比较合适)。
0003
如何在安装时选择2.6的内核?
在安装时输入linux26,回车即可。
0004
sources.list的写法
1)找到包含dists和pool这两个目录的那个目录,把地址记下来,比如http://mirrors.geekbone.org/debian/;
2)打开dists,里面包含的目录名字,记下来。比如http://mirrors.geekbone.org/debian/...h、woody、sid。
3)把这些目录名字记下来;打开以上目录,看看里面包含哪些组件目录,比如main、contrib、non-free;
4)书写格式:deb <1记下来的地址> <2记下来的名字> <3记下来的名字s>,如:deb ftp://ftp.linuxforum.net/debian/ sarge main contrib non-free
0005
教育网常用sources.list(以下只适用于sid即unstable用户,其它版本用户请酌情更改)中科大deb ftp://debian.ustc.edu.cn/debian unstable main non-free contrib deb-src ftp://debian.ustc.edu.cn/debian unstable main non-free contrib
大连理工deb ftp://mirror.dlut.edu.cn/debian unstable main non-free contrib
deb-src ftp://mirror.dlut.edu.cn/debian unstable main non-free contrib
清华大学deb ftp://ftp.tsinghua.edu.cn/mirror/debian/debian unstable main non-free contrib
deb-src ftp://ftp.tsinghua.edu.cn/mirror/debian/debian unstable main non-free contrib
非官方软件包(uo)
中科大uo仓库:wma、ape插件for xmms,以及 realplay等:deb ftp://debian.ustc.edu.cn/rarewares.org unstable main
mplayer等:deb ftp://debian.ustc.edu.cn/debian-uo sid marillat
j2re, j2sdk or mozilla java plugin:deb ftp://debian.ustc.edu.cn/debian-uo sid java
firefly fake bold font style package:慎重使用deb ftp://debian.ustc.edu.cn/debian-uo sid firefly
gbkfonts、xpdf等:deb ftp://debian.ustc.edu.cn/debian-uo sid ustc
其它一些uo:Bootsplash patches and utils:deb http://www.bootsplash.de/files/debian unstable main
Fangzheng Fonts、Matlab7、Mathematica、cedega等:deb ftp://202.38.73.198/debian sid foo
xmms2:deb http://exodus.xmms.se/debian stable main
Enlightenment E17 uo packages
deb http://soulmachine.net/debian unstable/
使用时添加到/etc/apt/sources.list里即可,但是非官方的uo软件包,使用时要慎重,以免发生依赖性错误;如需下载sources,请自行添加deb-src,后面内容相同。
0006
如何查找和安装软件?debian下的dpkg包管理系统有很多前端,以apt为例
a.查找软件 $apt-cache search (discripiton or name of the software)eg:apt-cache search lftp
b.安装软件 #apt-get install (packages's name),eg:apt-get install lftp
c.查看软件的信息 $apt-cache show (packages's name), eg:apt-cache show lftp注:安装软件需要root权限
0007
从基本系统安装X和桌面环境
a.X-window的安装只需要手动安装一个即可,即 #apt-get install x-window-systm,X-window的其它包会被自动安装;
b.桌面环境:debian中很多桌面环境都是有虚包的,比如kde gnome xfce blackbox fluxbox fvwm等等,安装的时候只需要 #apt-get install (name),eg:apt-get install kde
注:使用sid或者testing,在某些时期可能会出现依赖关系问题,可能apt-get install (name)的办法会提示broken package,遇到这种情况,要么等待,要么自己手动下载package解决依赖性问题,对于kde和gnome可以尝试先安装gnome-core和 kde-core,一般情况这两个包还是可以装上的。
0008
启动X以后桌面环境乱码通常是缺少中文字体造成的,安装相应的字体即可解决,debian中常用free中文字体如下:文鼎字体(gb2312 big5)ttf-arphic-bkai00mp, ttf-arphic-bsmi00mp, ttf-arphic-gbsn00lp, ttf-arphic-gkai00mp;包含了firefly点阵的unifont:ttf-arphic-ukai, ttf-arphic-uming(推荐,配合[email protected]的config文件,效果非常不错);如果安装了字体依然乱码,请检查是否具有中文的locale: $locale -a
0009
debian的文档
debian 的文档很详尽丰富,对于newbie,有两个文档是必读的,apt-how 和debian-reference,这两个文档都可以通过apt安装,通过apt安装apt-how-en debian-reference-zh-cn即可,想查看文档的时候是通过shell命令apt-howto、debian-reference即可访问浏览文档。http://www.linuxsir.org的debian版有apt-howto的中译版
0010
更改localedebian下有个功能强大的工具dpkg-reconfigure(常用),更改locale只需#dpkg-reconfigure locales (注意是locales),选择需要的locale即可
0011
选错了显卡驱动或者其它相关模块,导致X无法启动
可以手动修改X的配置文件,或者使用dpkg-reconfigure,sid中使用的是X.org,重新配置X使用 #dpkg-reconfigure xserver-xorg;其它版本可能是xfree86,使用命令#dpkg-reconfigure xserver-xfree86。对于其中不够明白的请留空,一般会自动检测。
0012
如何从控制台启动X
debian下并不是按照运行级别决定是否启动X的,所以修改inittab的方法对于debian不适用,可以安装rcconf,然后去掉其中的xmd/gdm/kdm即可,也可以使用#update-rc.d -f ?dm remove 完成这个工作。
0013
debian下的中文输入法有那些debian下的中文输入法有chinput、fcitx、scim、xcin等,其中scim是输入法平台,它的IMEgine有scim-pinyin scim-ccinput scim-fcitx scim-tables等
0014
dpkg命令 dpkg是debian的更底层的包管理工具,常用命令
a.查看某软件的安装状态,$dpkg -l (package name),支持通配符eg:dpkg -l nvidia*,即会显示以nvidia开头的所有包的情况;
b.查看某个安装的软件包中包含那些文件以及在何位置,$dpkg -L (package name)eg:dpkg -L lftp;
c.看某个文件属于哪个软件包,$dpkg -S (file name),eg:dpkg -S /usr/bin/lftp(只对已经安装的包有效);
d.手动安装某一软件包,下载回该软件包,#dpkg -i /path/to/deb file/(file name)eg:dpkg -i lftp_3.3.0-1_i386.deb;
e.查看某个deb包的信息,$dpkg -I (file name),eg:dpkg -I lftp_3.3.0-1_i386.deb
f.查看某个deb包中所包含文件,$dpkg -c (file name)eg:dpkg -c lftp_3.3.0-1_i386.deb;
g.将某个deb包解开,$dpkg -x (file name) path eg:dpkg -x lftp_3.3.0-1_i386.deb tmp,将包中所含文件和目录解压到tmp下;详细信息请参考man page
0015
删除软件
可以使用apt或者dpkg删除,对于apt-get:#apt-get remove (packages name),可以在remove后添加--purge 清除该软件的配置文件;对于dpkg:删除 #dpkg -r (packages name),删除并清除配置 dpkg -p (packages name)
apt-get 会自动解决依赖问题,而dpkg不会。
0016
安装非deb格式的软件包,例如rpm、slackware的taz debian下可以使用alien将rpm或者taz格式的软件包转换成deb格式
0017
我的系统缺少某个文件,但是要安装哪个 package 才能得到它呢?
上网方便的可以直接去 http://www.debian.org/distrib/packages#search_contents 查询。
如果需要在自己机器上查询,可以安装 apt-file 这个 package,具体用法:# /usr/bin/apt-file update 更新数据库$ /usr/bin/apt-file search <filename> 查找文件 $ /usr/bin/apt-file list <package name> 列出 package 的内容,类似于 dpkg -L,不同的是apt-file的对象可以是系统尚未安装的包。
0018
控制台下使用中文(弱)安装cce、zhcon、jfbterm
0019
有没有类似flashget的软件(弱)download for X,在debian下叫d4x
0020
设置自动加载某些模块
将需要加载的模块添加到/etc/modules中
0021
声卡驱动正确,但是进入桌面环境无声音
一般是没有访问/dev/dsp或者mixer权限导致,添加用户到audio组即可#adduser user audio,eg:adduser tom audio
0022
英文字体不好看
安装高质量的英文字体:ttf-bitstream-vera,这是一款很优秀的字体;另外也可以安装微软核心字体msttcoretonts,这只是一个安装包,会自动到sf.net下载相关字体,所以教育网用户可能需要使用代理,所装字体包括Times New Roman,Verdana等,可以免费使用。
0023
gnome2.10下菜单里的项目重复删除~/.local中的东西,重启gnome
0024
无法使用文泉驿的点阵字体
配置fontconfig,#dpkg-reconfigure fontconfig,开启点阵字体的支援
0025
nautilus中查看挂载分区属性时出现错误
如果使用scim 1.4.1以上版本,并且使用GTK_IM_MODULE的话,不使用GTK_IM_MODULE可以解决这个问题,或者使用gcc3.3编译的scim;
0026
由sun的官方jre等制作debian所需的deb包
1)安装java-package,#apt-get install java-package
2)下载sun的java包
3)在sun的java包所在目录执行 $fakeroot make-jpkg --email "your email address" FILENAME
eg:fakeroot make-jpkg --email "[email protected]" j2re-1_4_2_08-linux-i586.bin
如无问题会在当前目录生成java的deb包
0027
为什么ls没有色彩
修改~/.bash_profile,将其中有关~/.bashrc的一段改成如下所示:
# include .bashrc if it existsif [ -f ~/.bashrc ]; then ~/.bashrcfi之后logout,再登陆就可以了。
[1] [2] 下一页