LinuxÈëÃÅÈý
1.shell ÊÇϵͳµÄÓû§½çÃ棬ÌṩÁËÓû§ÓëÄں˽øÐн»»¥²Ù×÷µÄÒ»ÖÖ½Ó¿Ú£¨ÃüÁî½âÊÍÆ÷£©¡£Ëü½ÓÊÕÓû§ÊäÈëµÄÃüÁî²¢°ÑËüËÍÈëÄÚºËÈ¥Ö´ÐС£Æð
×Åе÷Óû§ÓëϵͳµÄÒ»ÖÂÐÔºÍÔÚÓû§Óëϵͳ֮¼ä½øÐн»»¥µÄ×÷Óá£
ShellÔÚLinuxϵͳÉϾßÓм«ÆäÖØÒªµÄµØλ
ShellµÄ°æ±¾£¬LinuxÓкܶàShell
echo $SHELL ²éѯ±¾ÏµÍ³µÄShell
more /etc/passwd ÖÐÒ²ÓмǼͬÑùÄܲ鵽
more /etc/shells ±¾ÏµÍ³Ö§³ÖµÄshell
¿ÉÒÔ¸Äshell Ö±½ÓÓÃash»òÕßcsh¡££¨µ±Ê±ÉúЧ£©
chsh -l¿ÉÒÔ²éѯµ±Ç°Ö§³ÖµÄchsh
chsh /bin/ash ÐÞ¸Äshell ×¢ÏúºóÉúЧ
2.ÎļþĿ¼µÄ²Ù×÷
touchÉú³ÉÒ»¸ö¿ÕÎļþ»ò¸ü¸ÄÎļþµÄʱ¼ä
cp ¸´ÖÆÎļþ»òĿ¼ cp -r Ŀ¼Ãû ¸´ÖÆĿ¼
mv Òƶ¯Îļþ»òĿ¼¡¢Îļþ»òĿ¼¸ÄÃû
rm ɾ³ýÎļþ»òĿ¼ rm -f ²»Ìáʾֱ½Óɾ³ý rm -rf ɾ³ýĿ¼²¢²»Ìáʾ
ln ½¨Á¢Á´½ÓÎļþ £¨ÀàËÆÓÚ¿ì½Ý·½Ê½£© ln -s /etc/passwd pass
wc ͳ¼ÆÖ¸¶¨Îı¾ÎļþµÄÐÐÊý¡¢×ÖÊý¡¢×Ö·ûÊý wc /etc/passwd
ls ÏÔʾÎļþ»òÕßĿ¼Áбí ls -l ls -a
cd Çл»Ä¿Â¼ cd /etc/ cd »Ø³µÖ±½Óµ½×Ô¼ÒÖ÷Ŀ¼Àï cd -»Øµ½Éϼ¶Ä¿Â¼
pwd ÏÔʾµ±Ç°¹¤×÷Ŀ¼
mkdir ´´½¨Ò»¸öĿ¼ mkdir -p test/a/b ÔÚtestϽ¨Á¢aĿ¼Ï½¨Á¢bĿ¼
rmdir ɾ³ýij¸öĿ¼ rmdir -rf test/
cat tac ÏÔʾÎļþÄÚÈÝ£¨Ö±½ÓÏÔʾµ½Ä©Î²£©
more less ÏÔʾÎļþÄÚÈÝ£¨¿ÉÒÔÏòÇ°Ïòºó·£©
head tail ÏÔʾÎļþµÄÈô¸ÉÐÐ head -5 /etc/passwd ÏÔʾÎļþµÄÍ·5ÐÐ
whereis ÏÔʾϵͳÎļþËùÔÚ·¾¶ whereis ping
find ÔÚϵͳÖÐÕÒµ½Ö¸¶¨Îļþ find zzf
locate ÔÚϵͳÖÐÕÒµ½Ö¸¶¨Îļþ locate (ÏÈÖ´ÐÐupdatedb´´½¨Ë÷ÒýĿ¼)
grep ÏÔʾָ¶¨Îı¾Îļþº¬ÓÐÖ¸¶¨µ¥´ÊµÄijÐÐ
Ïà¹ØÎĵµ£º
ÎÄռǼÁË×÷ÕßÔÚS3C2440¿ª·¢°åÉÏʵÏÖ°´¼üµãÁÁLEDÇý¶¯¿ª·¢µÄÏêϸ¹ý³Ì£¬»¹¼Ç¼ÁËһЩÈÝÒ׳öÏֵĴíÎó£¬ÒÔ¼°Ôõô½â¾öÕâЩ´íÎó¡£
Ò»¡¢Çý¶¯¿ª·¢Á÷³Ì
LinuxÇý¶¯¿ª·¢²»Í¬ÓÚÓ¦ÓóÌÐòµÄ¿ª·¢¡£Çý¶¯¿ª·¢ÊÇÖ±½ÓºÍÓ²¼þ´ò½»µÀµÄ£¬Í¨¹ý¶ÔÓ²¼þµÄ²Ù×÷¸øÓ¦ÓóÌÐòÌṩһЩ½Ó¿Úº¯Êý£¬Ê¹µÃÓ¦ÓóÌÐòÄܹ»&l ......
linuxÄں˻ù±¾Êý¾ÝÀàÐÍ×ܽá
¶ÔlinuxÄں˵ÄÊý¾ÝÀàÐÍ×öÒ»ÏÂ×ܽᡣ
ÏÂÃ沿·ÖÄÚÈݲο¼ÁË£ºhttp://book.csdn.net/bookfiles/12/100126.shtml
µ±
Linux
ÄÚºËÔÚÌåϵ½á¹¹²îÒì½Ï´óµÄƽ̨֮¼äÒÆֲʱ£¬»á²úÉúÓëÊý¾ÝÀàÐÍÏà¹ØµÄÎÊÌâ¡£ÔÚ±àÒëÄÚºËʱʹÓÃ
-Wall -Wstrict-prototypes
Ñ¡Ï¿ÉÒÔ±ÜÃâºÜ¶à´íÎóµÄ·¢Éú¡£
ÄÚºËʹÓõĻ ......
±¾Ô´´ÎÄÕÂÊôÓÚ¡¶Linux´óÅï¡·²©¿Í£¬²©¿ÍµØַΪhttp://roclinux.cn¡£ÎÄÕÂ×÷ÕßΪrocrocket¡£
Æô¶¯µÚÒ»²½££¼ÓÔØBIOS
µ±Äã´ò¿ª¼ÆËã»úµçÔ´£¬¼ÆËã»ú»áÊ×ÏȼÓÔØBIOSÐÅÏ¢£¬BIOSÐÅÏ¢ÊÇÈç´ËµÄÖØÒª£¬ÒÔÖÁÓÚ¼ÆËã»ú±ØÐëÔÚ×ʼ¾ÍÕÒµ½Ëü¡£ÕâÊÇÒòΪBIOSÖаüº¬ÁËCPUµÄÏà¹ØÐÅÏ¢¡¢É豸Æô¶¯Ë³ÐòÐÅÏ¢¡¢Ó²ÅÌÐÅÏ¢¡¢ÄÚ´æÐÅÏ¢¡¢Ê±ÖÓÐÅÏ¢¡¢PnPÌØ ......
1.¹Ø»ú
init 0»òÕß halt poweroff
ÖØÐÂÆô¶¯
init 6»òÕß reboot
¹Ø»úµÄʱºò֪ͨÏÂÆäËûÓû§ Shutdown
shutdown -r +5 (Îå·ÖÖÓÖ®ºó¹Ø»ú)
2.ÔÚLinuxÏ¿ÉÒÔʹÓó¤Îļþ»òĿ¼Ãû£¬ÐèÒª×ñѵĹæÔò
/ ½ûֹʹÓÃ
ºó׺ÊÇûÓÐʵ¼ÊÒâÒåµÄ
3.touch a ½¨Á¢Ò»¸öÎļþ
4.shellÃüÁîµÄÒ»°ã¸ñʽ
$cmd ......
ÕªÒª£º±¾ÕÂÊ×ÏÈÒÔÓ¦ÓóÌÐò¿ª·¢ÕߵĽǶÈÉóÊÓLinuxµÄ½ø³ÌÄÚ´æ¹ÜÀí£¬ÔÚ´Ë»ù´¡ÉÏÖð²½ÉîÈëµ½ÄÚºËÖÐÌÖÂÛϵͳÎïÀíÄÚ´æ¹ÜÀíºÍÄÚºËÄÚ´æµÄʹÓ÷½·¨¡£Á¦Çó´ÓÍâµ½ÄÚ¡¢Ë®µ½Çþ³ÉµØÒýµ¼ÍøÓÑ·ÖÎöLinuxµÄÄÚ´æ¹ÜÀíÓëʹÓá£ÔÚ±¾ÕÂ×îºó£¬ÎÒÃǸø³öÒ»¸öÄÚ´æÓ³ÉäµÄʵÀý£¬°ïÖúÍøÓÑÃÇÀí½âÄÚºËÄÚ´æ¹ÜÀíÓëÓû§ÄÚ´æ¹ÜÀíÖ®¼äµÄ¹Øϵ£¬Ï£Íû´ó¼Ò×îÖÕÄܼÝÔ¦ ......