您的位置:首页 > 运维架构 > Linux

Ubuntu使用笔记 1

2011-04-22 23:09 323 查看
 

1、查看操作系统输出的启动信息:

dmesg >boot.msg  或者 less /var/log/messages

如果我们需要某人帮助调试系统问题,我们可以把生成的boot.msg文件发送给他。

另外,当我们修改某一配置文件的时候,要先备份:

cp file file.backup

恢复:

cp file.backup file

 

2、更智能的dist-upgrade

首先, apt-get update

然后, apt-get dist-upgrade

dist-upgrade不仅可以执行upgrade而且还能更智能的改变新版本之间的依赖关系。

 

3、system log view

gnome桌面下的log查看工具,运行:gnome-system-log

 

4、安装显卡的3D驱动

sudo apt-get install drivename configtool

Nvidia:  

drivername: nvidia-glx

configtool:nvidia-setting

ATI:

drivername:xorg-driver-fglrx

configtool:fglrx-comtrol

完成以后,还要确保/etc/X11/xorg.conf里面Driver行的内容:

Nvidia:

Driver "nvidia"

ATI:

Driver "fglrx"

然后重启系统,验证:

Nvidia运行:flxgears

ATI运行:fgl_glxgears

 

5、配置串口调制解调器

为察看系统识别的端口列表,可以使用:dmesg | grep tty

在linux下,几乎所有与调制解调器相关的软件客户端都在寻找一个名为/dev/modem的符号链接,这个链接指向想要得到的设备。但是

这个链接不是默认就产生的,我们可以:

sudo ln -s /dev/ttyS0 /dev/modem .

 

6、搜索相关命令---apropos

我们可以像搜索引擎那样搜索与某一关键字有关的命令,如

apropos partition

myyangcui@myyangcui:/usr/share$ apropos partition

addpart (8)          - simple wrapper around the "add partition" ioctl

all-swaps (7)        - event signalling that all swap partitions have been activated

cfdisk (8)           - Curses/slang based disk partition table manipulator for Linux

delpart (8)          - simple wrapper around the "del partition" ioctl

fdisk (8)            - Partition table manipulator for Linux

mpartition (1)       - partition an MSDOS hard disk

partprobe (8)        - inform the OS of partition table changes

partx (8)            - telling the kernel about presence and numbering of on-disk partitions.

sfdisk (8)           - Partition table manipulator for Linux

要找出某个命令及其对应的文件,可以使用whereis命令,如:

whereis fdisk

 

7、更详细的命令文档--info

尽管我们可以使用man来进行命令相关的查找,但是如果想要获得详细的资料,必须使用info。

 

8、使某一个文件立即生效--source

source .bashrc

 

9、搜索文件系统的命令

• whereis command--返回该命令的位置及其手册页

• whatis command--从该命令的手册页中返回一行synopsis

• locate file--返回所有匹配的文件的位置;这是一种极为快速的文件系统搜索的方法,

                   因为,locate搜索的是包含系统上所有文件的索引的一个数据库。但是,

                   由于系统默认只会在一天的某个特定时间进行更新该数据库,所以,我们需要

                   使用sudo updatedb来更新这个数据库。在ubuntu10.10中,数据库文件是mlocate.db

                    位于/var/lib/mlocate/mlocate.db

 

• apropos subject--返回与某个主题相关的命令

 

10、解压缩

要创建某个目录的压缩档案文件,

tar -czf dirnme.tgz dirname

解压缩

tar -zxf archive

 

11、在console窗口中打开emacs

eamcs -nw file.txt

 

12、定时关机

shutdown -h 20:23 "this is a test"

取消关机:

shutdown -c

 

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息