Programming/Linux (λ¦¬λˆ…μŠ€)

[λ¦¬λˆ…μŠ€/Linux] systemd λž€? ( systemctl )

MOONCO 2022. 7. 1. 14:53

πŸ‘‰ systemd λž€?

λ¦¬λˆ…μŠ€ λΆ€νŒ…μ‹œ, κ°€μž₯ 처음으둜 μ‹€ν–‰λ˜λŠ” ν”„λ‘œκ·Έλž¨ ( PID1번 )

μ‹œμŠ€ν…œμ„ μ΄ˆκΈ°ν™”ν•˜κ³ , ν™˜κ²½μ„ μ„€μ •ν•΄μ€€λ‹€.

 

systemd둜 ν”„λ‘œκ·Έλž¨ 관리

// μ‹œμž‘
systemctl start ν”„λ‘œκ·Έλž¨μ΄λ¦„

// μ’…λ£Œ
systemctl stop ν”„λ‘œκ·Έλž¨μ΄λ¦„

// μ’…λ£Œ ν›„ μž¬μ‹œμž‘
systemctl restart ν”„λ‘œκ·Έλž¨μ΄λ¦„

// μ’…λ£Œν•˜μ§€ μ•Šκ³  μ„€μ •λ§Œ λ‘œλ“œ
systemctl reload ν”„λ‘œκ·Έλž¨μ΄λ¦„

// 싀행쀑인지 확인
systemctl status ν”„λ‘œκ·Έλž¨μ΄λ¦„

// μ‹œμž‘ ν”„λ‘œκ·Έλž¨μœΌλ‘œ μ§€μ • (λΆ€νŒ…μ‹œ μ‹€ν–‰)
systemctl enable ν”„λ‘œκ·Έλž¨μ΄λ¦„

// μ‹œμž‘ ν”„λ‘œκ·Έλž¨ μ‚­μ œ
systemctl disable ν”„λ‘œκ·Έλž¨μ΄λ¦„
λ°˜μ‘ν˜•