ºìÁªLinuxÃÅ»§
Linux°ïÖú

È«Ãæ×ܽá²é¿´LinuxÈ«²¿Ó²¼þÐÅÏ¢

·¢²¼Ê±¼ä:2011-06-13 10:10:40À´Ô´:LinuxÉçÇø×÷Õß:ØýÃû

LinuxÈ«²¿Ó²¼þÐÅÏ¢ÊÇÎÒÃÇʹÓÃÕâһϵͳʱ¹Ø×¢µÄÒ»¸öÖص㣬ÕâÀï½éÉܲú¿´CPU¡¢ÄÚ´æ´óС¡¢Ó²ÅÌ¡¢Íø¿¨µÈµÈ¡£LinuxÈ«²¿Ó²¼þÐÅÏ¢²é¿´Òª×¢Òâÿ¸öÃüÁîºóÃæËù¸úµÄ²ÎÊý£¬²ÎÊý²»Í¬Ð§¹û²»Í¬¡£


1¡¢ÈçºÎ²é¿´CPUÀàÐÍÒÔ¼°Ïà¹ØÌØÐÔ£¿


·½·¨Ò»£º
LinuxÏÂCPUÏà¹ØµÄ²ÎÊý±£´æÔÚ /proc/cpuinfo ÎļþÀ
²é¿´ÎļþÄÚÈÝ£¬¼´¿ÉÖªµÀCPUÏà¹ØµÄ¼¼Êõ²ÎÊý¡£

·½·¨¶þ£º
²ÉÓÃÃüÁî dmesg | grep CPU ¿ÉÒԲ鿴µ½Ïà¹ØCPUµÄÆô¶¯ÐÅÏ¢

²é¿´CPUµÄλÊý¿ÉÒÔÕâÑù getconf LONG_BIT£¬²»ÊÇ32λ¾ÍÊÇ64λÁË¡£


2¡¢ÈçºÎ²é¿´ÄÚ´æ´óСÒÔ¼°Ê¹ÓÃÇé¿ö£¿


·½·¨Ò»£º
Ö±½Ó²é¿´ /proc/meminfo Îļþ

·½·¨¶þ£º
ʹÓà free -m ÃüÁî²é¿´£¬ÈçÏ£º

[root@miix proc]# free -m
total used free  shared buffers  cached
Mem:  748  738 9 0  121  304
-/+ buffers/cache:  313  435
Swap: 768 0  768

¿ÉÒÔ¿´µ½×ÜÄÚ´æΪ748M£¬Ê¹ÓÃÁË738M£¬¿ÕÏÐ9M£¬½»»»¿Õ¼ä768M»¹Ã»Ê¹Óá£
ÆäʵÎÒµÄÎïÀíÄÚ´æÊÇ768MµÄ£¬Ò»Ð©ÄÚ´æºÍÏÔ¿¨¹²ÏíÁË¡£

·½·¨Èý£º
ʹÓà top ÃüÁîÒ²¿ÉÒÔ¿´µ½ÊµÊ±µÄÄÚ´æʹÓÃÇé¿ö¡£


3¡¢ÈçºÎ²é¿´Ó²ÅÌÐͺÅÒÔ¼°Ïà¹Ø²ÎÊý£¿


·½·¨Ò»£º
fdisk -l ¿ÉÒÔ¿´µ½ÏµÍ³ÉϵĴÅÅÌ(°üÀ¨UÅÌ)µÄ·ÖÇøÒÔ¼°´óСÏà¹ØÐÅÏ¢¡£

·½·¨¶þ£º
Ö±½Ó²é¿´ /proc/partitions Îļþ¡£

·½·¨Èý£º
ͨ¹ýÃüÁî hdparm -i /dev/hda »ñÈ¡Ó²ÅÌÏêϸÎïÀí²ÎÊý


4¡¢ÈçºÎ²é¿´Íø¿¨Ïà¹ØÐÅÏ¢£¿


·½·¨Ò»£º
ethtool eth0 ²ÉÓôËÃüÁî¿ÉÒԲ鿴µ½Íø¿¨Ïà¹ØµÄ¼¼ÊõÖ¸±ê
£¨±¾È˲âÊÔ¹ý²»Ò»¶¨ËùÓÐÍø¿¨¶¼Ö§³Ö´ËÃüÁ

ethtool -i eth1 ¼ÓÉÏ -i ²ÎÊý²é¿´Íø¿¨Çý¶¯
¿ÉÒÔ³¢ÊÔÆäËü²ÎÊý²é¿´Íø¿¨Ïà¹Ø¼¼Êõ²ÎÊý

·½·¨¶þ£º
Ò²¿ÉÒÔͨ¹ý dmesg | grep eth0 µÈ¿´µ½Íø¿¨Ãû×Ö(³§¼Ò)µÈÐÅÏ¢

ͨ¹ý²é¿´ /etc/sysconfig/network-.s/ifcfg-eth0
¿ÉÒÔ¿´µ½µ±Ç°µÄÍø¿¨ÅäÖðüÀ¨IP¡¢Íø¹ØµØÖ·µÈÐÅÏ¢¡£
µ±È»Ò²¿ÉÒÔͨ¹ýifconfigÃüÁî²é¿´¡£


5¡¢ÈçºÎ²é¿´USBÉ豸Ïà¹ØÐÅÏ¢£¿


·½·¨Ò»£º
Æäʵͨ¹ý fdisk -l ÃüÁî¿ÉÒԲ鿴µ½½ÓÈëµÄUÅÌÐÅÏ¢£¬±¾È˵ÄUÅÌÐÅÏ¢ÈçÏ£º

Disk /dev/sda: 2012 MB, 2012217344 bytes
16 heads, 32 sectors/track, 7676 cylinders
Units = cylinders of 512 * 512 = 262144 bytes

Device BootStartEndBlocksId  System
/dev/sda1* 16  7676  1961024 b  W95 FAT32

UÅ̵ÄÉ豸ÎļþÊÇ /dev/sda£¬2G´óС£¬FAT32¸ñʽ¡£

Èç¹ûÓû§µÇ½µÄ²»ÊÇLinuxͼÐνçÃ棬UÅ̲»»á×Ô¶¯¹ÒÔØÉÏÀ´¡£
´Ëʱ¿ÉÒÔͨ¹ýÊÖ¹¤¹ÒÔØ(mount)£º
mount /dev/sda1 mount_point
ÒÔÉÏÃüÁUÅ̹ÒÔص½µ±Ç°Ä¿Â¼µÄ mount_point Ŀ¼£¬×¢Òâ¹ÒµÄÊÇ sda1 ²»ÊÇ sda¡£
жÔØÃüÁîÊÇ umount mount_point

LinuxĬÈÏûÓÐ×Ô´øÖ§³ÖNTFS¸ñʽ´ÅÅ̵ÄÇý¶¯£¬µ«¶ÔFAT32Ö§³ÖÁ¼ºÃ£¬¹ÒÔصÄʱºòÒ»°ã²»ÐèÒª -t vfat ²ÎÊý ¡£
Èç¹ûÖ§³Öntfs£¬¶Ôntfs¸ñʽµÄ´ÅÅÌ·ÖÇøӦʹÓà -t ntfs ²ÎÊý¡£
Èç¹û³öÏÖÂÒÂëÇé¿ö£¬¿ÉÒÔ¿¼ÂÇÓà -o iocharset=×Ö·û¼¯ ²ÎÊý¡£

¿ÉÒÔͨ¹ý lsusb ÃüÁî²é¿´ USB É豸ÐÅϢŶ£º

[root@miix tmp]# lsusb
Bus 001 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 004 Device 002: ID 0951:1613 Kingston Technology
Bus 004 Device 001: ID 0000:0000


6¡¢ÈçºÎ²é¿´¹âÅÌÏà¹ØÐÅÏ¢£¿


·½·¨Ò»£º
²åÈëCD¹âµúºó£¬ÔÚ±¾È˵ÄRHEL5ϵͳÀ¹âµúÎļþÊÇ /dev/cdrom£¬
Òò´ËÖ»Ðè mount /dev/cdrom mount_point ¼´¿É¡£

[root@miix tmp]# mount /dev/cdrom mount_point
mount: block device /dev/cdrom is write-protected, mounting read-only

Æäʵ×Ðϸ¿´Ò»Ï£¬¹âÇýµÄÉ豸ÎļþÊÇ hdc

[root@miix tmp]# ls -l /dev/cdrom*
lrwxrwxrwx 1 root root 3 01-08 08:54 /dev/cdrom -> hdc
lrwxrwxrwx 1 root root 3 01-08 08:54 /dev/cdrom-hdc -> hdc

Òò´ËÎÒÃÇÒ²¿ÉÒÔÕâÑù mount /dev/hdc mount_point
Èç¹û¹âÇýÀïû·ÅÈëÓÐЧ¹âÅÌ£¬Ôò±¨´í£º

[root@miix tmp]# mount /dev/hdc mount_point
mount: ÕÒ²»µ½½éÖÊ


7¡¢ÈçºÎ¹ÒÔØISOÎļþ£¿


·½·¨£º
mount -o loop *.iso mount_point


8¡¢ÈçºÎ²é¿´Ö÷°åÐÅÏ¢£¿


ʹÓÃÃüÁî lspci ¼´¿É