Debian笔记(2)
Posted by unicell on Friday, June 30, 2006 · Leave a Comment
设置屏幕分辨率和刷新率
dpkg-reconfigure xserver-xorg
还不行的话,继续
apt-get install xdebconfigurator
xdebconfigurator
系统时钟写入CMOS
hwclock –systohc
反之
hwclock –hctosys
移除无用的locale files文件
localpurge
查看软件依赖关系
apt-cache depends packagename
apt-cache showsrc packagename|grep Build-Depends
下载网站文档
wget -r -p -np -k http://fedora.redhat.com/docs/release-notes/fc5/zh_CN/
· -r:在本机建立服务器端目录结构;
· -p: 下载显示HTML文件的所有图片;
· -np:只下载目标站点指定目录及其子目录的内容;
· -k: 转换非相对链接为相对链接。
修改系统登录信息
/etc/motd
将网卡标识与mac绑定
auto lo eth0 eth1
iface lo inet loopback
mapping eth0 eth1
map 00:37:E9:17:64:AF netA
map 00:21:E9:17:64:B5 netB
iface netA inet static
address etc…
iface netB inet static
address etc…
export http_proxy=http://xx.xx.xx.xx:xxx可以给apt设置代理
加入环境变量HISTIGNORE=”ls:cd:cat”可以让bash的历史忽略ls cd cat命令
检测nvidia显卡
~$glxgears
~$ glxinfo | grep rendering
修改用户资料
chfn userid
useradd 与 adduser 区别
useradd应该是源于unix的命令,passwd包提供.
使用时需要明确指定参数,不会自动创建家目录和对应组,
仅仅操作/etc/passwd和/etc/shadow
对应 userdel
adduser是一个交互shell脚本,发行版相关.同名包提供.
自动创建创建家目录和对应组, 引用/etc/skel/配置.
在命令执行过程中会调用 useradd.
对应deluser
没用装zhcon(装好基本系统后)看中文
jfbterm -q -c other,GB2312,iconv,UTF-8
由于需要fb支持
所以在/boot/grub/menu.lst里
加入 vga=788(或其它)
控制台快照
setterm -dump 1
1为第一个虚拟控制台
禁用ipv6
/etc/modprobe.d/aliases
#alias net-pf-10 ipv6
alias net-pf-10 off
modconf 移除 ipv6模块
使用 gdm 实现自动登录
/etc/gdm/gdm.conf
[daemon]
AutomaticLoginEnable=true
AutomaticLogin=tony
wajig – simplified Debian package management front end
用lftp显示服务器提示信息
lftp 缺省不会显示 ftp 服务器的欢迎信息和错误信息,可以在 ~/.lftprc 里写入一行
debug 3
国内的很多站点都是GBK的代码,而现在系统默认的编码是utf8的,所以,最好再加上
set ftp:charset gbk
set file:charset utf8
系统服务
1.编写启动脚本, 并将其置于 /etc/init.d/目录下
2. 付予 可执行权限
3. 设定为启动服务
#/usr/sbin/update-rc.d <shell name> defaults
4.将其删除
#/usr/sbin/update-rc.d -f <shell name> remove
5.根据运行级别设定,例如
#/usr/sbin/update-rc.d <shell name> start 20 1 2 3 . stop 20 4 5 .
给定关键字, 查找相关命令
apropos keyword
不同控制台切换
ALT加左右箭头
开机自动打开 数字键盘
/etc/console-tools/config
# Turn on numlock by default
LEDS=+num
摘录自
http://www.linuxsir.org/bbs/showthread.php?t=228856
Tags:
debian,
linux
相关文章