Thursday, September 26, 2019

หัดใช้ systemd

ก่อนหน้านี้ที่เป็น init ก็ใช่ว่าจะใช้เก่งอะไรมากมาย แต่เห็นว่าพักหลังต้องอยู่กับมันมากขึ้นเลยต้องใช้ให้บ่อยๆ จะได้คล่องกว่าเดิม

start & stop อันนี้ใช้บ่อย จำได้
systemctl start name.service
systemctl stop name.service 

enabel & disable  units
systemctl enable name.service
systemctl disable name.service

check status
systemctl status name.service 

 ต้องการดู units ทั้งหมด

systemctl list-units --all

ดู state ของ units
systemctl list-units --all --state=inactive

ดูประเภทของ units
systemctl list-units --type=service


ดู All units files
systemctl list-unit-files

อ้างอิง: how to manage systemd

No comments: