Upgrade to Pro — share decks privately, control downloads, hide ads and more …

もっとくわしいコマンドライン/Linux(OS)のしくみ_前編

 もっとくわしいコマンドライン/Linux(OS)のしくみ_前編

前回のLinux・コマンドラインに関するスライドの続編です。
https://speakerdeck.com/jjoo/puroguraminguxue-xi-falseqian-nidu-mitai-linux-os-falseshi-zu-mi

Mentaにてフロントエンドエンジニアを目指す方向けのレッスンを提供しております。
https://menta.work/plan/1608

version1-workspace

July 08, 2020
Tweet

More Decks by version1-workspace

Other Decks in Programming

Transcript

  1. 䛂0MRY\37 䛾௙⤌䜏䛃๓⦅
    䜒䛳䛸䛟䜟䛧䛟䟿

    View full-size slide

  2. 䛱䜗䛳䛸䛚䛥䜙䛔

    View full-size slide

  3. 0MRY\䛸䛿䠛
    —䜰䝥䝸䜔䝕䝞䜲䝇䜢ືస䛥䛫䜛䛯䜑䛾ᇶᮏ䝋
    䝣䝖䜴䜵䜰䠄37䠅
    —+9-ୖ䛷౑䛖䝁䞁䝋䞊䝹䝁䝬䞁䝗ධຊ⏝䛾䜰䝥
    䝸䜿䞊䝅䝵䞁'9- 䛜䝍䞊䝭䝘䝹
    —ヲ䛧䛟䛿䝥䝻䜾䝷䝭䞁䜾Ꮫ⩦䛾๓䛻ㄞ䜏䛯䛔
    䛂0MRY\37 䛾௙⤌䜏䛃ཧ↷

    View full-size slide

  4. 䜰䝥䝸䜿䞊䝅䝵䞁䜢స䜛䛺䜙
    37䜢⌮ゎ䛧䛶䛚䛟ᚲせ䛜䛒䜛
    䛺䛬䛺䜙37䛾ୖ䛻⮬ศ䛯䛱䛾䜰䝥䝸䜢స䛳䛶䛔䜛䛛䜙

    View full-size slide

  5. ᐙ䜢ᘓ䛶䜛䛺䜙
    ᅵᆅ䛾䛣䛸䜢▱䛳䛶䛚䛣䛖
    ᆅ㟈䛾ከ䛔ᆅᇦ䛺䜙䚸
    ⪏㟈ᵓ㐀䛾ᐙ䜢ᘓ䛶䜛

    View full-size slide

  6. 䜻䞊䝽䞊䝗
    —䝴䞊䝄䞊ᶒ㝈
    —⎔ቃኚᩘ
    —䝟䝑䜿䞊䝆⟶⌮
    —䝥䝻䝉䝇
    —䜽䞊䝻䞁
    —䝛䝑䝖䝽䞊䜽⣔䝁䝬䞁䝗
    ௒ᅇ䛾⠊ᅖ

    View full-size slide

  7. 䝴䞊䝄䞊ᶒ㝈

    View full-size slide

  8. 37䛿
    䝴䞊䝄䞊䛸䜾䝹䞊䝥䛷
    ⟶⌮䛥䜜䜛

    View full-size slide

  9. 䝴䞊䝄䞊 䜾䝹䞊䝥
    䛭䛾௚

    View full-size slide

  10. 䝁䞁䝢䝳䞊䝍䛻䝻䜾䜲䞁䛩䜛
    0MRY\䛿䠍ྎ䛾䝁䞁䝢䝳䞊䝍䜢」ᩘ䛾䝴䞊䝄䞊䛷౑
    ⏝䛷䛝䜛䜘䛖タィ䛥䜜䛶䛔䜛
    䛭䛾䛯䜑䚸䝴䞊䝄䞊䛤䛸䛾ᶒ㝈䜢⟶⌮䛧䛶䛔䜛
    䚷—䝴䞊䝄䞊䛤䛸䛻౑⏝䛷䛝䜛䜒䛾
    䚷—䛹䛾䝴䞊䝄䞊䜒ඹ᭷䠄䜾䝹䞊䝥䠅䛷
    䚷䚷౑⏝䛷䛝䜛䜒䛾
    䠙䛹䛾䝴䞊䝄䞊䛷ධ䜛䛛㑅ᢥ䛩䜛

    View full-size slide

  11. [LSEQM䝁䝬䞁䝗
    ⌧ᅾ䝻䜾䜲䞁䛧䛶䛔䜛䜰䜹䜴䞁䝖䜢⾲♧
    䚷䚷䚷䚷䚷䚷䚷䚷䚷䚷䚷䚷䚷䚷XEVS䜰䜹䜴䞁䝖䠅
    [LSEQM
    XEVS

    View full-size slide

  12. PWP䝁䝬䞁䝗
    ⌧ᅾ䛾䝕䜱䝺䜽䝖䝸┤ୗ䝣䜯䜲䝹୍ぴ䜢ヲ⣽᝟ሗ௜䛝䛷⾲♧
    PWP
    8SXEP
    V[VV$XEVSWXEJJ6IWYQITHJ
    V[V$XEVSWXEJJQEXIVMEPNTK

    ᶒ㝈᝟ሗ
    䝣䜯䜲䝹
    䜸䞊䝘䞊
    ᡤᒓ䛩䜛
    䜾䝹䞊䝥
    䝣䜯䜲䝹
    䝃䜲䝈
    䝍䜲䝮䝇䝍䞁䝥
    䠄᭦᪂᪥௜䠅
    䝣䜯䜲䝹ྡ⛠

    View full-size slide

  13. V[VV$XEVSWXEJJ6IWYQITHJ
    PWP䝁䝬䞁䝗ᶒ㝈᝟ሗ䛾ぢ᪉

    䜸䞊䝘䞊
    ᶒ㝈
    V[VV
    䜾䝹䞊䝥
    ᶒ㝈
    䛭䛾௚
    ᶒ㝈
    V !VIEH ㄞ䜏ྲྀ䜚ᶒ㝈
    [ ![VMXI ᭩䛝ྲྀ䜚ᶒ㝈
    \ !I\IGYXI ᐇ⾜ᶒ㝈䠄䝇䜽䝸䝥䝖䛾ᐇ⾜ᶒ㝈䠅
    ! ᶒ㝈䛺䛧
    䝴䞊䝄䞊䜔䜾䝹䞊䝥䛜䝣䜯䜲䝹䛻ᑐ䛧䛶ᣢ䛴ᶒ㝈䜢⾲♧
    V[\䠙
    䛺䜣䛷䜒
    䛷䛝䜛

    View full-size slide

  14. 䝣䜯䜲䝹䛾ᐇ⾜ᶒ㝈䜢ኚ䛘䜛ሙྜ
    㐍ᩘ"
    !!V[\ 䠖䝣䝹ᶒ㝈
    !!V[ 䠖ㄞ䜏ྲྀ䜚᭩䛝ྲྀ䜚䛾䜏
    !!V\
    !!V 䠖ㄞ䜏ྲྀ䜚䛰䛡
    !![\
    !![
    !!\
    !!
    GLQSH6IWYQITHJ

    ᶒ㝈᝟ሗ 䝣䜯䜲䝹ྡ
    GLQSH䝁䝬䞁䝗䜢౑⏝䛩䜛
    䜘䛟౑䛖䜒䛾
    !ㄡ䛷䜒ఱ䛷䜒


    !᭩䛝㎸䜏チ䛥䛺䛔

    View full-size slide

  15. 䛭䛾௚PW䝁䝬䞁䝗
    ヲ⣽䜒⾲♧
    PWP
    㞃䛧䝣䜯䜲䝹ྵ䜑䛶䛩䜉䛶⾲♧
    PWE
    ᭦᪂᪥᫬䛷䝋䞊䝖䛧䛶⾲♧䠄ྂĺ᪂䠅
    PWPXV

    View full-size slide

  16. 䛭䛾௚䝁䝬䞁䝗
    䝻䜾䜲䞁䛧┤䛥䛪䚸䝴䞊䝄䜢ษ䜚᭰䛘䜛䠄VSSX䝴䞊䝄䞊䜈䠅
    WY
    ᣦᐃ䛧䛯ྡ๓䛾䝴䞊䝄䞊䛻ษ䜚᭰䛘䜛
    WY䝴䞊䝄䞊ྡ
    ⟶⌮⪅VSSX䝴䞊䝄䞊䠅ᶒ㝈䛸䛧䛶ᐇ⾜
    WYHS䝣䜯䜲䝹ྡ

    View full-size slide

  17. ᐇ㝿䛻྇䛔䛶䜏䜘䛖
    0EWXPSKMR7YR.YRSRXX]W
    8LIHIJEYPXMRXIVEGXMZIWLIPPMWRS[^WL
    8SYTHEXI]SYVEGGSYRXXSYWI^WLTPIEWIVYRDGLWLWFMR^WLD
    *SVQSVIHIXEMPWTPIEWIZMWMXLXXTWWYTTSVXETTPIGSQOF,8
    XEVSRS1EG&SSO4VSbXEVSPWP
    XSXEP
    HV[\$XEVSWXEJJ%TTPMGEXMSRW
    HV[\$XEVSWXEJJ(IWOXST
    HV[\$XEVSWXEJJ(SGYQIRXW
    HV[\$XEVSWXEJJ(S[RPSEHW
    HV[\$XEVSWXEJJ0MFVEV]
    HV[\XEVSWXEJJ1SZMIW
    HV[\XEVSWXEJJ1YWMG
    HV[\XEVSWXEJJ4MGXYVIW
    HV[\V\V\XEVSWXEJJ4YFPMG
    XEVSRS1EG&SSO4VSbXEVS

    View full-size slide

  18. 0MRY\䛿䠍ྎ䛾䝁䞁䝢䝳䞊䜢」ᩘ
    䛾䝴䞊䝄䞊䛷౑⏝䛷䛝䜛

    View full-size slide

  19. 8IVQMREP䛾㉳ື᫬䛻䚸
    䝴䞊䝄䞊䛤䛸䛾タᐃ䜢
    ㄞ䜏㎸䜣䛷䛔䜛

    View full-size slide

  20. 䝴䞊䝄䞊タᐃ䝣䜯䜲䝹
    䝴䞊䝄䞊䛤䛸䛻⊂⮬䛾䝁䝬䞁䝗䜔4%8,䜢
    ⎔ቃኚᩘ䜢౑䛖䛣䛸䛷タᐃྍ⬟
    ĺ䝍䞊䝭䝘䝹䛾❧䛱ୖ䛢᫬䚸䝻䜾䜲䞁䛸
    ྠ᫬䛻䝴䞊䝄䞊䛤䛸䛾タᐃ䝣䜯䜲䝹
    䠄FEWLVG䜔FEWLCTVSƻPI䠅䜢ㄞ䜏㎸䜐
    䝻䜾䜲䞁䛾䛯䜃䛻ᡭື
    䛷⎔ቃኚᩘ䜢ධ䜜䛺䛟
    䛶῭䜐

    View full-size slide

  21. ⎔ቃኚᩘ

    View full-size slide

  22. ⎔ቃኚᩘ
    37඲య䛷ཧ↷ྍ⬟䛺ኚᩘ
    ᐃ⩏䛥䜜䛶䛔䜛ኚᩘ䛾☜ㄆ⏝䝁䝬䞁䝗
    I\TSVXT
    —௒䛔䜛䝕䜱䝺䜽䝖䝸䛾タᐃ
    —䝩䞊䝮䝕䜱䝺䜽䝖䝸
    —ゝㄒ䛾ᩥᏐ䝁䞊䝗䚷➼䚻
    WIXE
    1EG ;MRHS[W

    View full-size slide

  23. ⎔ቃኚᩘ䛾౛
    —4;( 䠖௒䛔䜛䝕䜱䝺䜽䝖䝸
    —,31) 䠖䝻䜾䜲䞁䝴䞊䝄䛾䝩䞊䝮䝕䜱䝺䜽䝖䝸
    —(%8) 䠖᪥௜
    —0'C'8=4)䠖ᩥᏐ䛾ศ㢮䚸኱ᩥᏐᑠᩥᏐ䛾ኚ᥮
    —4%8, 䠖䝣䜯䜲䝹䜔䝣䜷䝹䝎䛾ሙᡤ
    䛯䛸䛘䜀䞉䞉䞉
    4VSKVEQ*MPIW@1]'SQQERH@Q]*MPIƻPI
    䜢ኚᩘྡ䛂Q]*MPI䛃䛸䛧䛶Ⓩ㘓
    ĺ䝍䞊䝭䝘䝹䛷ẖᅇ䝣䝹䝟䝇䜢ධ䜜䛺䛟
    䛶䜒࿧䜃ฟ䛫䜛䜘䛖䛻

    View full-size slide

  24. タᐃ䛥䜜䛶䛔䜛⎔ቃኚᩘ䜢ぢ䜛
    䝩䞊䝮䝕䜱䝺䜽䝖䝸䛜タᐃ䛥䜜䛶䛔䜛⎔ቃኚᩘ䛂,31)䛃䛾್䜢ฟຊ
    IGLS,31)
    ⌧ᅾ䛾䝕䜱䝺䜽䝖䝸䛜タᐃ䛥䜜䛶䛔䜛4;(䛾್䜢ฟຊ
    IGLS4;(
    䛆IGLS䛇
    ௵ព䛾ᘬᩘ䛾ᩥᏐิ䜢
    ฟຊ䛩䜛䝁䝬䞁䝗

    View full-size slide

  25. 4%8,䛻䛴䛔䛶䜒䛖ᑡ䛧

    View full-size slide

  26. ⎔ቃኚᩘ4%8,
    」ᩘ䛾䝕䜱䝺䜽䝖䝸䜢Ⓩ㘓䛷䛝䜛
    ĺ4%8,䛻Ⓩ㘓䛥䜜䛯䝕䜱䝺䜽䝖䝸䛾୰䛻䛒䜛䝣䜯䜲
    䝹䛿䚸0MRY\ෆ䛷䝟䝇ྡ䜢┬␎䛧䛶ᣦᐃ䛷䛝䜛

    View full-size slide

  27. ⎔ቃኚᩘ4%8,䜢ぢ䜛
    ⎔ቃኚᩘ䛂4%8,䛃䛾タᐃෆᐜ䜢☜ㄆ䛷䛝䜛
    IGLS4%8,
    ᣦᐃ䛥䜜䛯䝁䝬䞁䝗䛾ᐇ⾜䝣䜯䜲䝹䛾䝣䝹4%8,䛜ฟ䛶䛟䜛
    IK ධຊ䠖[LMGLPW䚷ĺฟຊ䠖FMRPW
    [LMGL䝁䝬䞁䝗ྡ
    ྛ䝁䝬䞁䝗䛿䚸䝕䞊䝍䛸ྠᵝ䚸グ᠈
    ፹య䛻ಖᏑ䛥䜜䛶䛔䜛䛂䝣䜯䜲䝹䛃䛾
    䜂䛸䛴

    View full-size slide

  28. ⎔ቃኚᩘ4%8,䜢ぢ䜛
    XEVSRS1EG&SSO4VSbXEVSIGLS4%8,
    YWVPSGEPFMRYWVFMRFMRYWVWFMRWFMR0MFVEV]%TTPIYWVFMR
    XEVSRS1EG&SSO4VSbXEVS
    XEVSRS1EG&SSO4VSbXEVS
    XEVSRS1EG&SSO4VSbXEVS
    XEVSRS1EG&SSO4VSbXEVS
    XEVSRS1EG&SSO4VSbXEVS[LMGLT[H
    FMRT[H
    XEVSRS1EG&SSO4VSbXEVS
    XEVSRS1EG&SSO4VSbXEVS
    XEVSRS1EG&SSO4VSbXEVS
    XEVSRS1EG&SSO4VSbXEVS
    XEVSRS1EG&SSO4VSbXEVS
    XEVSRS1EG&SSO4VSbXEVS
    XEVSRS1EG&SSO4VSbXEVST[H
    9WIVWXSQSRECW
    YWVPSGEPFMR
    YWVFMR
    FMR
    YWVWFMR
    WFMR
    0MFVEV]%TTPIYWVFMR
    䛜4%8,䛻Ⓩ㘓䛥䜜䛶䛔䜛

    䐠䝁䝬䞁䝗䛂T[H䛃䛾ᐇ⾜䝣䜯䜲䝹䛿
    䚷FMR䝕䜱䝺䜽䝖䝸䛾୰䛻ಖᏑ䛥䜜䛶䛔䜛
    䐡4%8,ኚᩘ䛻FMR䛜Ⓩ㘓䛥䜜䛶䛔䜛䛯䜑䚸
    䛂FMRT[H䛃䛸䛔䛖䝣䝹䝟䝇䜢ᡴ䛯䛺䛟䛶䜒䛂 T[H䛃䝣䜯䜲䝹䜢ᐇ⾜䛷䛝䜛

    View full-size slide

  29. 䝟䝑䜿䞊䝆⟶⌮

    View full-size slide

  30. 37䛾䝟䝑䜿䞊䝆⟶⌮
    37䛻䜒䝟䝑䜿䞊䝆䛜䛒䜚䚸䛭䜜䛮䜜䛾ฎ⌮䛿䝷䜲䝤
    䝷䝸䜢ㄞ䜏㎸䜐䛣䛸䛷⾜䛳䛶䛔䜛
    䛂PW䛃䛺䛹䛾䝁䝬䞁䝗䜒䚸37䛻
    䝕䝣䜷䝹䝖䛷ධ䛳䛶䛔䜛䝷䜲
    䝤䝷䝸䛾୍䛴
    䈜ᐇ⾜䝣䜯䜲䝹䚸タᐃ䝣䜯䜲䝹䚸䝷䜲䝤䝷䝸➼䜢䜎䛸䜑䛯䜒䛾

    View full-size slide

  31. 䝟䝑䜿䞊䝆⟶⌮䝅䝇䝔䝮
    RTQ䛾䜘䛖䛻䚸37䛷䜒䝟䝑䜿䞊䝆䜢
    ⟶⌮䛩䜛䝅䝇䝔䝮䛜䛒䜛
    ĺ⟶⌮䝅䝇䝔䝮⤒⏤䛷䝟䝑䜿䞊䝆䜢䝎䜴䞁䝻䞊䝗䛩䜛
    䛸䚸⎔ቃኚᩘ4%8,䛻⮬ືⓗ䛻ධ䜜䛶䛟䜜䜛
    —FVI[ 䠖1EG37⏝
    —YFYRXY 䠖0MRY\⏝䠄ETXKIX䝁䝬䞁䝗䠅

    View full-size slide

  32. ETXKIX䝁䝬䞁䝗
    WYHSETXKIXMRWXEPPTEGOEKI

    䝁䝬䞁䝗 䝟䝑䜿䞊䝆ྡ
    䝟䝑䜿䞊䝆䜢ྲྀᚓ䛧䛶䜲䞁䝇䝖䞊䝹䠋䜰䝑䝥䝕䞊䝖䛩䜛
    WYHSETXKIXWYTKVEHI

    䜸䝥䝅䝵䞁䠄௵
    ព䠅
    䜸䝥䝅䝵䞁䝁䝬䞁䝗䜢䛴䛡䜛ሙྜ䛿ETXKIX䛾ᚋ䜝䛻
    WYHS䜢౑䛔⟶
    ⌮⪅ᶒ㝈䛷ᐇ

    View full-size slide

  33. ETXKIX䝁䝬䞁䝗䛾✀㢮䐟
    ᣦᐃ䛧䛯䝟䝑䜿䞊䝆䛾䜲䞁䝇䝖䞊䝹䠋䜰䝑䝥䝕䞊䝖
    ᣦᐃ䛧䛯䝟䝑䜿䞊䝆䛾๐㝖䠄タᐃ䝣䜯䜲䝹䛿๐㝖䛥䜜䛺䛔䠅
    WYHSETXKIXVIQSZI䝟䝑䜿䞊䝆ྡ
    ᣦᐃ䛧䛯䝟䝑䜿䞊䝆䛾๐㝖䠄タᐃ䝣䜯䜲䝹ྵ䜑๐㝖䠅
    WYHSETXKIXTYVKI䝟䝑䜿䞊䝆ྡ
    WYHSETXKIXMRWXEPP䝟䝑䜿䞊䝆ྡ

    View full-size slide

  34. ETXKIX䝁䝬䞁䝗䛾✀㢮䐠
    䜰䝑䝥䝕䞊䝖ྍ⬟䛺䝟䝑䜿䞊䝆䛾᭷↓䜢☜ㄆ䛧䚸䝟䝑䜿䞊䝆䝸䝇
    䝖䜢᭦᪂䛩䜛
    ᭦᪂䛩䜛䝟䝑䜿䞊䝆䛸䜲䞁䝇䝖䞊䝹῭䜏䛾䝟䝑䜿䞊䝆䛾㛫䛷ၥ
    㢟䛜㉳䛝䛺䛔䛛䝏䜵䝑䜽
    WYHSETXKIXGLIGO
    䜲䞁䝇䝖䞊䝹䛥䜜䛶䛔䜛䝟䝑䜿䞊䝆䜢᭱᪂䝞䞊䝆䝵䞁䛻᭦᪂䛩䜛
    WYHSETXKIXYTKVEHI
    WYHSETXKIXYTHEXI

    View full-size slide

  35. 䜻䞊䝽䞊䝗
    —䝴䞊䝄䞊ᶒ㝈
    䚷0MRY\䛿䝴䞊䝄䞊䠋䜾䝹䞊䝥䛷ᶒ㝈䜢⟶⌮䛥䜜䛶䛚䜚䚸䚷ྛ
    䝣䜯䜲䝹䛿ᐇ⾜ᶒ㝈䛜タᐃ䛥䜜䛶䛔䜛
    —⎔ቃኚᩘ
    䚷37඲య䛷ཧ↷ྍ⬟䛺ኚᩘ䚹FEWLCTVSƻPI䛺䛹䛾
    タᐃ䝣䜯䜲䝹䛷ᐉゝ䜢⾜䛔䚸ᐉゝ䜢┬␎䛷䛝䜛䚹
    —䝟䝑䜿䞊䝆⟶⌮
    䚷ᐇ⾜䠋タᐃ䝣䜯䜲䝹䜔䝷䜲䝤䝷䝸䜢୍ᣓ䛷⟶⌮䛩䜛䛣䛸
    䝟䝑䜿䞊䝆⟶⌮䝅䝇䝔䝮䛻䜘䛳䛶䝋䝣䝖䜴䜵䜰䛾䜲䞁
    䝇䝖䞊䝹䛺䛹䜢⾜䛖

    View full-size slide

  36. 37䛿
    ;IF䜰䝥䝸䜿䞊䝅䝵䞁䛾ᇶ┙

    View full-size slide

  37. 䜰䝥䝸䜢స䜛䛺䜙
    37䛾䛣䛸䜢▱䛳䛶䛚䛣䛖

    View full-size slide

  38. 䜻䞊䝽䞊䝗
    —䝴䞊䝄䞊ᶒ㝈
    —⎔ቃኚᩘ
    —䝟䝑䜿䞊䝆⟶⌮
    —䝥䝻䝉䝇
    —䜽䞊䝻䞁
    —䝛䝑䝖䝽䞊䜽⣔䝁䝬䞁䝗
    ๓⦅䛾⠊ᅖ
    ᚋ⦅䛾⠊ᅖ

    View full-size slide

  39. 8SFIGSRXMRYIH

    View full-size slide

  40. 䛒䜚䛜䛸䛖䛤䛦䛔䜎䛧䛯

    View full-size slide