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

linuxÏÂʵÏÖhello world!

·¢²¼Ê±¼ä:2012-04-11 23:56:47À´Ô´:ºìÁª×÷Õß:songjiacai
ϵͳ£ºÐéÄâ»ú+DEBIAN
Äںˣº2.6.32
˵Ã÷£º´ËʱĬÈÏϵͳÖÐÒѾ­×°ºÃGCC±àÒëÆ÷¡£
Öն˲Ù×÷ÈçÏ£º
su root #½øÈëroot
#ÊäÈëÃÜÂë
cd /tmp
vi hello.c
#½øÈëVIÖбà³Ì
#include

int main(void)
{
printf("hello world!");
return 0;
}
#±£´æÍ˳ö£¬VIÖеÄÃüÁîÊÇ ÏÈESCÈ»ºóÇÃÈë:wq
gcc hello.c -o a.out #Ö±½Ó±àÒëÉú³É¿ÉÖ´ÐÐÎļþ£¬ÆäÖÐ.outµÄÎļþÃû²»ÒªºÍ.cÎļþÃûÏàͬ
#±àÒëͨ¹ý£¬ÈôûÓÐͨ¹ý×Ðϸ¼ì²é´úÂ룬Èô´úÂëûÓÐÎÊÌ⣬¿ÉÄÜÊÇÍ·ÎļþµÄ·¾¶ÓÐÎÊÌâ
#Ò»°ãÍ·ÎļþÓ¦¸ÃÔÚ/usr/include£¬Èô²»ÊǵĻ°ÐèÒªÁíÍâÔö¼ÓÍ·ÎļþµÄ·¾¶£¬´Ëʱ¿ÉÄܾͱȽÏÂé·³
#ÁË¡£ÒòΪ¿ÉÄܲ¢²»ÖªµÀÍ·ÎļþÔÚÄÄ£¬´ËʱÎÒÖ»ÄÜ°®ÄªÄÜÖúÁË¡£¶ÔÄãÔâÓö±íʾͬÇ飬µ«Ï£ÍûÄã²»Òª»ÒÐÄ£¬
#ÎÊÌâ×ÜÊÇ»á½â¾öµÄ¡£
#ÔËÐпÉÖ´ÐÐÎļþ
./a.out
#Èç¹û˳Àû£¬»áÔÚÖն˳öÏÖhello world!×Ö·û´®¡£
#ÖÁ´Ë£¬linuxϵÄhello world!¾ÍÍê³ÉÁË¡£
#OK,let's go!
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 50 ÌõÆÀÂÛ

  1. zeng_cong ÓÚ 2014-08-01 16:51:02·¢±í:

    ÌìÄÅ£¬ºÃ¸ßÉî~

  2. junchen3721 ÓÚ 2014-07-25 12:20:59·¢±í:

    ѧÁË£¡£¡£¡

  3. ²Ë²Ë123 ÓÚ 2014-07-21 23:51:30·¢±í:

    ÐÂÊÖѧϰ

  4. dragonjoy5204 ÓÚ 2014-06-06 15:59:47·¢±í:

    ºÃ¶«Î÷»¹ÊÇ·ÖÏíºÃ

  5. lhnicker@126.co ÓÚ 2014-06-06 12:07:50·¢±í:

    ¸Ðл·ÖÏí£¡

  6. bybandzk ÓÚ 2014-04-18 16:56:33·¢±í:

    ¿´¿´

  7. Î÷ÐÅ ÓÚ 2014-04-09 15:20:32·¢±í:

    ²»´í

  8. µûÎè×í·ç ÓÚ 2014-01-24 14:48:20·¢±í:

    ·¹ý£¬¼Ó¸öÓÍ

  9. suС²¼ ÓÚ 2013-10-27 10:59:46·¢±í:

    ÕýÔÚѧϰÕâ¸ö

  10. jiangwei_linux ÓÚ 2013-10-27 09:18:53·¢±í:

    ûÍæ¹ý¡£¡£

  11. asd001897 ÓÚ 2013-10-16 20:57:52·¢±í:

    ºÃ¶«Î÷markÒ»ÏÂ

  12. jeffkuang1 ÓÚ 2013-10-14 15:40:51·¢±í:

    Ϊʲô±à³ÌµÄµÚÒ»¸ö³ÌÐò¶¼ÊÇHello World!

  13. ÑÌÏûÔÆÉ¢ ÓÚ 2013-06-05 23:34:56·¢±í:

    ³ÁĬ

  14. jabwking ÓÚ 2013-06-03 10:40:46·¢±í:

    cÓïÑÔµÄhello wordÂ¥Ö÷˵Çå³þ

  15. dyzsihu4 ÓÚ 2013-04-30 16:44:34·¢±í:

    ÐÂÊÖѧϰÁË£¡

  16. zzz2006 ÓÚ 2013-04-20 13:21:56·¢±í:

    ÒѾ­ÔÚredhatʵÏÖÁË

  17. aaammhua ÓÚ 2013-04-20 00:35:26·¢±í:

    ÔÚviÀïÔõôɾ³ýд´íµÄ´úÂë°¡£¬ÐÂÊÖ²»¶®£¬»¹Íû½âÎö£¬Ð»Ð»

  18. youjh90 ÓÚ 2013-04-16 20:41:38·¢±í:

    Õâ¸ö±íʾ»¹ÊǺܼòµ¥µÄ

  19. SlingWalk ÓÚ 2013-04-04 13:51:10·¢±í:

    ÕâÊǼòµ¥C ³ÌÐò£¡

  20. data1658 ÓÚ 2013-02-04 15:41:34·¢±í:

    ±ê×¼½Ì³Ì£¡

  21. txgc_wm ÓÚ 2013-01-20 23:49:24·¢±í:

    1# songjiacai

    #include

    int main(int argc, char **argv)
    {
    printf("hello world!");
    return 0;
    }

    Èç¹ûÊÇÐÂÊֵĻ°£¬×îºÃÒ»¿ªÊ¼ÒÔ±ê×¼µÄÐÎʽÊéд¡£

  22. txgc_wm ÓÚ 2013-01-20 23:47:50·¢±í:

    24# dog200606


    »òÐíÊǸöÐÂÊÖ°É£¡

  23. redflag006 ÓÚ 2013-01-20 10:36:02·¢±í:

    luguo

  24. mcuyang ÓÚ 2013-01-13 15:28:53·¢±í:

    hao

  25. gky2009514 ÓÚ 2012-12-07 12:46:05·¢±í:

    ÐÂÊÖÍê³ÉÈÎÎñ£¬ÇóÏÂÊé¼®~

  26. taoshang08 ÓÚ 2012-10-06 04:12:26·¢±í:

    ÊÔÒ»ÊÔ£¡£¡

  27. ¼ÅįÍ䵶 ÓÚ 2012-10-05 00:17:57·¢±í:

    ѧϰ

  28. dog200606 ÓÚ 2012-08-12 19:14:26·¢±í:

    Õâ¸öÒ²¿ÉÒÔµ¥¶À·¢³ö¡­¡­

  29. szalex ÓÚ 2012-07-16 14:15:59·¢±í:

    ÓÐɶÓã¿

  30. yt20090291 ÓÚ 2012-06-30 14:40:39·¢±í:

    ¸Õ¸ÕÇ°¼¸Ìì×Ô¼ºÊÔÁËÏÂ

  31. ÊÖÐĵÄÌ«Ñô ÓÚ 2012-05-28 18:44:55·¢±í:

    Áì½Ì~~~~~~?

  32. ÊÖÐĵÄÌ«Ñô ÓÚ 2012-05-28 18:44:23·¢±í:

    ºÃ~

  33. chunhuiever ÓÚ 2012-05-14 10:18:14·¢±í:

    àÅ£¬´úÂëÎÞÎ󣬲Ù×÷ÕýÈ·£¬hello world

  34. honglianqxw123 ÓÚ 2012-05-12 07:59:27·¢±í:

    лл¥Ö÷¡£

  35. nndshaya008 ÓÚ 2012-05-08 11:53:53·¢±í:

    ¹Ø¼üÊÇûÃ÷°×Õâ¸ö¾ßÌåʵÏÖÁËʲô¹¦ÄÜ£¬Ö»ÊÇÔÚÖжϵÄij¸öλÖÃÏÖʵhello world ×Ö·ûô£¡£¿

  36. w0621_yzb ÓÚ 2012-04-22 18:56:15·¢±í:

    лл·ÖÏí£¡

  37. sauntor ÓÚ 2012-04-22 00:31:44·¢±í:

    [i=s] ±¾Ìû×îºóÓÉ sauntor ÓÚ 2012-4-22 00:33 ±à¼­ [/i]

    ¹ûÈ»ºÜÇ¿´ó£¬Â¥Ö÷Ì«À÷º¦ÁË£¬¸ßÊÖѽ£¡£¡£¡ (6)m:b

  38. aitingkong ÓÚ 2012-04-21 21:38:41·¢±í:

    vi hello.c Ò²¿ÉÒÔÊÇvim hello.c(6)m:b

  39. zep19900530 ÓÚ 2012-04-21 16:52:15·¢±í:

    ºÃÊé

  40. zep19900530 ÓÚ 2012-04-21 16:51:56·¢±í:

    ºÃÊé