Linux±à³ÌÖØÒªÄ¿Â¼ÓëÎļþ
1. ÖØÒªÄ¿Â¼
µ±ÎÒÃǽøÈëLinuxϵͳºó£¬ÏñÔÚWindowsÃüÁîÌáʾ·ûÏÂÔËÐгÌÐòÄÇÑù£¬ÎÒÃÇÓëShell³ÌÐò(ͨ³£Îªbash)½»»¥£¬shell³ÌÐòÔÚÖ¸¶¨µÄĿ¼¼¯ÏÂѰÕÒÎÒÃÇÆÚÍûµÄ³ÌÐòÎļþ¡£ÕâЩĿ¼ͨ³£´æ·ÅÔÚShell±äÁ¿PATHÖУ¬ÕâÓëwindowsϵͳÊÇÒ»ÑùµÄ¡£ËÑË÷·¾¶PATHÓÉϵͳ¹ÜÀíÔ±ÅäÖã¬Í¨³£»á°üº¬Ò»Ð©ÏµÍ³³ÌÐòµÄ±ê×¼´æ·ÅĿ¼¡£°üÀ¨£º
/bin ϵͳÒýµ¼³ÌÐò
/usr/bin ϵͳ³ÌÐò
/usr/local/bin Óû§³ÌÐò
/sbin:/usr/sbin ϵͳ¹ÜÀí³ÌÐò
->/opt һЩϵͳ×é¼þ»òµÚÈý·½µÄÓ¦ÓóÌÐò¿ÉÄÜ·ÅÔÚ¸Ã×ÓĿ¼ÖÐ
°²×°³ÌÐòÓÐʱ»áͨ¹ý°²×°½Å±¾½«×Ô¼ºµÄĿ¼Ìí¼Óµ½PATH±äÁ¿ÖС£ÔÚPATH±äÁ¿ÖУ¬²»Í¬µÄĿ¼ÒÔðºÅ·Ö¸ô¡£ ÔÚÃüÁîÐÐÏÂÊäÈëecho $PATH £¬ÆÁÄ»ÉϾͻá´òÓ¡³öµ±Ç°Óû§µÄPATH±äÁ¿Öµ£¬ÀýÈ磺
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
ÏÂÃæÎÒÃÇͨ¹ýʵÀý˵˵PATH±äÁ¿µÄ×÷ÓÃ
ÊäÈëÒÔϳÌÐò
/*******test.c*******/
#include<stdio.h¡·
int main()
{
printf("Hello World!\n");
exit(0)
}
±àÒëÁ´½ÓÉú³É¿ÉÖ´ÐÐÎļþ£º
cc -o test test.c
ÕâÑùÔÚµ±Ç°Ä¿Â¼Ï¾ÍÉú³ÉÁËÒ»¸ötestÎļþ£¬Èç¹ûÎÒÃÇÖ±½ÓÔÚÃüÁîÐÐÏÂÊäÈëtestÔËÐиóÌÐò£¬ÊDz»»áµÃµ½Ô¤ÆÚµÄЧ¹ûµÄ£¬ÔÒò¾ÍÔÚÓÚPATH±äÁ¿Öв¢²»°üº¬µ±Ç°Ä¿Â¼£¬Òò¶øShellÕÒ²»µ½¸ÃÎļþ¡£´ËÍ⣬Èç¹ûPATH±äÁ¿ÖеÄijĿ¼Öаüº¬ÃûΪtestµÄ¿ÉÖ´ÐÐÎļþ£¬ÄÇôÕâ¸ö“test"Îļþ¾Í»á½âÊÍÖ´ÐУ¬»¹ÓоÍÊÇShell»áÓÅÏÈÖ´ÐÐPATH±äÁ¿Ç°ÃæÄ¿Â¼ÏµÄÎļþ£¬Ò²¾ÍÊÇ˵¼´Ê¹PATH±äÁ¿Öаüº¬Á˵±Ç°Ä¿Â¼£¬µ«Èç¹ûλÓÚ¸ÃÄ¿Â¼Ç°ÃæµÄĿ¼ÖÐÓÐͬÑùµÄ¿ÉÖ´ÐÐÎļþ£¬ÄÇôÎÒÃǵÄÎļþÈÔÈ»µÃ²»µ½Ö´ÐС£ÎªÁ˱ÜÃâÕâÖÖDZÔÚµÄÎÊÌ⣬ÎÒÃÇ¿ÉÒÔÔÚÒªÖ´ÐеÄÎļþÃûÇ°Ãæ¼ÓÉÏ“./”ǰ׺£¬±íʾִÐе±Ç°Ä¿Â¼ÏµÄÎļþ£¬²¢ÇÒ¿ÉÒÔ±ÜÃâÏòPATH±äÁ¿ÖÐÌí¼Óµ±Ç°Ä¿Â¼¡£
°Ñµ±Ç°Ä¿Â¼Ìí¼Óµ½PATHÖУº
&nbs
Ïà¹ØÎĵµ£º
LINUXϰ²×°QQ
Òª°²×°QQÊ×ÏÈÒª°²×°Java»·¾³¡£
g-r_j'LOVfGuest1¡¢°²×°JAVA»·¾³
UB?v1h(Bd`)[3W9IGuest´ò¿ªÖÕ¶Ë£¬Ö´ÐÐÒÔÏÂÃüÁ»òʹÓá¶ÐÂÁ¢µÃÈí¼þ¹ÜÀíÆ÷¡·£¬ÔÚÆäÖзֱðËÑË÷“sun-java5-jre“ºÍ“sun-java5-jdk”²¢±ê¼Ç°²×°¡£EETOPרҵ²©¿Í---µç×Ó¹¤³Ìʦ×Ô¼ºµÄ¼ÒÔ°sv ......
ËäÈ»ÒÔǰҲ±àÒë¹ýÄںˣ¬µ«ÊǹØÓÚÄÚºËÅäÖÃÑ¡ÏîÌØ±ðÊÇÓйر¾»úÇý¶¯Õâ¿é»¹ÊDz»ÊìϤ£¬ÒòΪûÓÐͨ¹ýÈ·¶¨ÓÐЧµÄ;¾¶ÖªµÀµ±Ç°¹¤×÷Õý³£µÄÄÚºËÖе½µ×ʹÓÃÁËʲôÇý¶¯Ä£¿éÀ´¿ØÖÆÓ²¼þ£¬×î½ü¿´µ½Ò»±¾Êé¡¶Linux kernel in a netshell¡·£¬¸Ð¾õ½²µÄ»¹²»´í£¬ËùÒÔ¼Çϱʼǡ£
1.±àÒëÄں˵Ť¾ß
& ......
Ò»¸öÓû§¡¢Ò»¸ö×é
ÎÒÃÇÀ´¿´Ò»¿´ Linux ȨÏÞºÍËùÓÐȨģÐÍ¡£ÎÒÃÇÒѾ¿´µ½Ã¿¸öÎļþÊôÓÚÒ»¸öÓû§ºÍÒ»¸ö×é¡£ÕâÕýÊÇ Linux ÖÐȨÏÞÄ£Ð͵ĺËÐÄ¡£Äú¿ÉÒÔÔÚ ls -l Çåµ¥Öв鿴Óû§ºÍ×飺
$ ls -l /bin/bash
-rwxr-xr-x 1 root wheel 430540 Dec 23 18:27 /bin/bash
ÔÚÕâ¸öÌØÊâµÄʾÀýÖУ¬/bin/bash ¿ÉÖ´ÐÐÎļþÊôÓÚ ro ......
/etc/inittabÎļþµÄ×ֶμ°Æä˵Ã÷
/etc/inittabÎļþÖÐÿ¸öµÇ¼ÇÏîµÄ½á¹¹¶¼ÊÇÒ»ÑùµÄ£¬¹²·ÖΪÒÔðºÅ“£º”·Ö¸ôµÄ4¸ö×ֶΡ£¾ßÌåÈçÏ£º
identifier : run_level : action : process
ÆäÖУ¬¸÷×Ö¶ÎÒÔ¼°ÓëÆäÏà¹ØµÄ˵Ã÷ÈçÏ£º
identifier
µÇ¼ÇÏî±êʶ·û£¬×î¶àΪ4¸ö×Ö·û¡£ÓÃÓÚΩһµØ±êʶ/etc/inittabÎļþÖеÄÿһ¸öµÇ¼ÇÏ ......