1. 修改启动时的默认系统,root下\boot\grub\grub.cnf 将default改为1。
2. linux中大小写有区分。
3. su 有可以使普通用户拥有超级用户的权限。
4. 上箭头可以重复上一个命令。继续上箭头可以重复以前的命令。
5. man 命令名 可以帮助显示命令的功能。q可以退出man命令。
6. find / -name 命令名 可以给出命令所在的路径。find 目录名可查找文件,ctrl+c可停止命令的执行过程。find 目录名 | more 可对目录中的内容分屏查看。
7. fdisk -l 可以查看许同的存储设备。
8. env 可以查看所有的环境变量。包括path路径。
9. export PATH=$ PATH:/sbin 可以将/sbin加入到path中。
10. mount -t vfat -o iocharset=cp936 /dev/hda5 /mnt/floppy是挂载命令。
mount [选项] <挂载设备名称> <挂载点>
umount /mnt/floppy
umount <挂载点或设备名>
11. export PATH=$PATH:/sbin 可以将/sbin加入到path中,可是只是暂时加入,当关掉shell后在从进入时必须重新加入,永久加入的方法是 vi /ect/profile 中将上命令加入,然后重新登陆或执行 source /etc/profile 意思是将/etc/profile中的命令全部执行一遍。
12. exit 可以退出shell;
13. rpm -ivh RPM软件包全路径名 安装软件包
rpm -e RPM软件包全路径名 卸载软件包
rpm -q 查看软件包
rpm -U RPM软件包全路径名 升级软件包
14. ctrl+space切换出输入法,shoft+ctrl更换输入法
15. 改变swap大小的方法:
[code]1. choose a location where you have lots of space (/usr comes to mind)
2. create a file the size you want the swap to be:
dd if=/dev/zero of=/usr/swap bs=1024 count=100000
(the above will create a file 100Mb in size, so adjust the count as yousee fit)
/*
Here may be wrong. Comment by baif.
*/
3. run the command: mkswap /usr/swap
4. run the command: swapon /usr/swap
5. check w/ free that you just added 100Mb of swap
6. if you want this to be permanent through reboots, you'll need to add the appropriate line to /etc/fsta[/code]


yorktown 于 2006-09-17 16:03:40发表:
以后说不定有用里
yuguoguo 于 2006-09-17 11:34:17发表:
收藏,正缺这方面知识