ÕûÀíÁËһЩ³£ÓõÄLinuxÃüÁî
ÕûÀíÁËһЩ³£ÓõÄLinuxÃüÁî
http://jythoner.javaeye.com/blog/290976
¹Ø¼ü×Ö: linux
1.²é¿´ÏµÍ³ÄÚºË
#uname -a
2.²é¿´cpuÐÅÏ¢
#cat /proc/cpuinfo
3.²é¿´ÄÚ´æʹÓÃÇé¿ö
#free -m
4.²é¿´Ó²ÅÌÊ£Óà¿Õ¼ä
#df -h
5.²é¿´Ä¿Â¼Õ¼Óÿռä
#du -hs Ŀ¼Ãû
6.²é¿´µ±Ç°ÓÐÄÄЩ½ø³Ì
#ps -A
7.²é¿´µ±Ç°½ø³ÌµÄʵʱÇé¿ö
#top
8.²é¿´½ø³Ì´ò¿ªµÄÎļþ
#lsof -p
9.²é¿´Ä³¸öÎļþ±»ÄÄЩӦÓóÌÐò¶Áд
#lsof ÎļþÃû
10.²é¿´µ±Ç°¼àÌý80¶Ë¿ÚµÄ³ÌÐò
#lsof -n -i :80
11.¿ìËÙ²éÕÒij¸öÎļþ
#whereis filename
12.ÏÔʾxxxÎļþµ¹Êý6ÐеÄÄÚÈÝ
#tail -n 6 xxx
13.²éÕÒ°üº¬xxx×Ö·û´®µÄÎļþ
#grep -l -r xxx
14.ͳ¼Æµ±Ç°Îļþ¸öÊý
#ls /usr/bin|wc -w
15.½«±¾µØÎļþ¿½±´µ½·þÎñÆ÷ÉÏ
#scp -rp /path/filename username@remoteIP:/path
16.½«Ô¶³ÌÎļþ´Ó·þÎñÆ÷ÏÂÔص½±¾µØ
#scp -rp username@remoteIP:/path/filename/path
[
Ïêϸ½²½âÏÂscp
Ê×Ïȼì²ésshd·þÎñÊÇ·ñÆô¶¯£º
#ps -aux | grep sshd /usr/sbin/sshd
Èç¹ûûÓÐÆô¶¯£¬Ê¹ÓÃÃüÁîÆô¶¯sshd·þÎñ£º
#service sshd start
È»ºóʹÓÃÒÔÉÏÁ½¸öÃüÁî½øÐд«Ê䣬Èç¹û´«Êäʧ°Ü£¬¼ì²éetc/ssh/sshd_configÎļþÖÐ PermitRootLoginyesrootsshÏîÊÇ·ñΪyes
]
17.²é¿´CPUʹÓÃÇé¿ö
#top|grep CPU
18.²é¿´ÄÚ´æʹÓÃÇé¿ö
#top|grep Mem
19.ͳ¼Æ½ø³ÌÊý
#ps -aux|wc –l
20.²é¿´¹ÒÔØÐÅÏ¢
#mount –l
21.²é¿´locale
#locale
22.²éÕҶ˿ںÅËù¶ÔÓ¦µÄ½ø³ÌºÅ
#netstat –ntlp
23.²é¿´µ±Ç°ÏµÍ³×Ô¶¯Æô¶¯µÄ·þÎñ£¬Æô¶¯×´Ì¬·ÅÔÚ/etc/inittabÎļþÖÐ
#chkconfig –list
1. lnÈíÁ´½ÓºÍÓ²Á´½ÓµÄÇø±ð£ºÈíÁ´½ÓÏ൱ÓÚ¿ì½Ý·½Ê½£¬Ó²Á´½ÓÕ¼´ÅÅÌ¿Õ¼ä´óСÓëÔÎļþÏàͬ
2. suÓësu-µÄÇø±ð£ºsu-¼Ì³ÐÁËrootµÄϵͳ±äÁ¿£¬su²»¼Ì³Ð
3. ext2Óëtxt3Çø±ð£ºext2ÎÞÈÕÖ¾¹¦ÄÜ£¬±ÀÀ£ºóÖØÐÂÆô¶¯Âý
4. GRUBÓëLILOµÄÇø±ð£ºLILOµÄ/boot·ÖÇø²»ÄÜ·ÖÔÚ³¬¹ý1024ÖùÃæµÄµØ·½£¬´óÔ¼ÊÇÔÚ8.4G×óÓҵĵط½
5. GRUBµÄÆô¶¯ÅäÖÃÎļþ£º/boot/grub/menu.lst
6. ÍøÂçÅäÖÃĿ¼ /etc/sysconfig/network
7. Íø¿¨ÅäÖÃÎļþ ifcfg-1o
8. DNSÎļþ /etc/resolv.conf
9. hostÎļþ /etc/hosts
10. ·þÎñÎļþ /etc/service
11.RHELÏà¹Ø£º
°ü¹ÜÀíÆ÷£ºsystem-config-packages
Ô¶³Ì°²×°£ºlinux vnc vncpassword=faint123
Ô¶³Ì¹Ø±Õ·À»ðǽ£ºsetup
Ïà¹ØÎĵµ£º
Linux Äں˼ò½é
ÏÖÔÚÈÃÎÒÃÇ´ÓÒ»¸ö±È½Ï¸ßµÄ¸ß¶ÈÀ´ÉóÊÓһϠGNU/Linux ²Ù×÷ϵͳµÄÌåϵ½á¹¹¡£Äú¿ÉÒÔ´ÓÁ½¸ö²ã´ÎÉÏÀ´¿¼ÂDzÙ×÷ϵͳ£¬Èçͼ 2 Ëùʾ¡£
ͼ 2. GNU/Linux ²Ù×÷ϵͳµÄ»ù±¾Ìåϵ½á¹¹
ϵͳµ÷Óýӿڣ¨SCI£©µÄ·½·¨
ʵ¼ÊÉÏ£¬Ìåϵ½á¹¹¿ÉÄܲ¢²»Ïñͼ 2 ËùʾµÄÒ»ÑùÇåÎú¡£ÀýÈ磬´¦Àíϵͳµ÷Ó㨴ÓÓû§¿Õ¼äÇл»µ½ÄÚºË¿Õ ......
linuxÃæÊÔ´óÈ«
Ò»£®Ìî¿ÕÌ⣺
1. ÔÚLinuxϵͳÖУ¬ÒÔ Îļþ ·½Ê½·ÃÎÊÉ豸 ¡£
2. LinuxÄÚºËÒýµ¼Ê±£¬´ÓÎļþ /etc/fstab ÖжÁÈ¡Òª¼ÓÔصÄÎļþϵͳ¡£
3. LinuxÎļþϵͳÖÐÿ¸öÎļþÓà i½Úµã À´±êʶ¡£
4. È«²¿´ÅÅÌ¿éÓÉËĸö²¿·Ö×é³É£¬·Ö±ðΪÒýµ¼¿é ¡¢×¨ÓÃ¿é ¡¢ i½Úµã±í¿é ºÍÊý¾Ý´æ´¢¿é¡£
5. Á´½Ó·ÖΪ£º Ó²Á´½Ó ºÍ ·ûºÅÁ´½Ó ¡ ......
¼ÇµÃÎÒÃÇÔÚÉÏƪÎÄÕÂmem_init()·ÖÎöÖÐÌáµ½__free_page()º¯ÊýÂð£¿ÎÒÃÇÏÖÔÚÀ´ÍêÉÆËü¡£ËüµÄµ÷Óùý³ÌÊÇÕâÑùµÄ£ºmem_init()->free_all_bootmem_node():ÎÒÃÇÖªµÀÕâ¸öº¯ÊýÊÇͳ¼ÆÒ»¹²ÊÍ·ÅÁ˶àÉÙ¿ÕÏÐÒ³¡£->free_all_bootmem_core()¾ÍÊÇÔÚÕâ¸öº¯ÊýÀïÃæÏȺó¶à´Îµ÷ÓÃ__free_pages()º¯Êý¡£Ä¿µÄ¾ÍÊÇΪÁËÊÍ·Åÿ¸öÄÚ´ænodeÀïÃæÎ ......
LinuxµÄϵͳµ÷ÓÃÊÇͨ¹ýÖжÏÀ´ÊµÏֵģ¬´ÓÓû§Ì¬½øÈëϵͳ̬¡£Óû§Ì¬ºÍϵͳ̬ÓкÜÇåÎúµÄÇø·Ö£¬±£Ö¤ÁË°²È«¡£ÏµÍ³µ÷ÓñíÊÇϵͳµ÷ÓõÄÌøת±í¡£Ê¹ÓüĴæÆ÷´«µÝ²ÎÊý£¬¶ø²»ÊÇÕ»£¬ÒòΪÓû§Ì¬ÊÇÎÞ·¨·ÃÎÊϵͳջµÄ¡£µØÖ·´íÎóÊÇͨ¹ýÒ³ÃæÒì³£À´´¦ÀíµÄ¡£
LinuxÄں˲¢²»Ö§³ÖÕæÕýÒâÒåÉϵÄỊ̈߳¬
LinuxThreads
ÊÇÓÃÓëÆÕͨ½ø³Ì¾ßÓÐͬÑùÄÚºË ......
½ñÌìÓöµ½Òªµ¼³öÊý¾Ý¿âÖбíµÄÊý¾Ý¡£ÏÂÃæÕâ¸ö¾Í¿ÉÒԸ㶨¡£¡£
#µ¼³öÖ¸¶¨µÄ±í #µ¼³öÃüÁî -uÓû§Ãû -pÃÜÂë -hÖ÷»úIPµØÖ· Êý¾Ý¿âÃû ±íÃû1 ±íÃû2 > µ¼³öÎļþ.sql
mysqldump -uroot -proot -h192.168.0.88 ok_db oktable1 oktable2 > ok_db.sql
ÁíÍâÔÚ¸ü¸ÄmysqlÃÜÂëʱºò£¬ÍøÉÏÓÐЩÃüÁî²»¶Ô£º
ÎÒÓÃÈçÏ£ºset password=pas ......