일반적인 Systemd 명령어

preeded·2022년 9월 7일
0

Systemd

Systemd는 다수의 리눅스 배포판에서 채택된 시스템, 서비스 관리자입니다. 때문에 리눅스를 사용하다보면 필연적으로 엮일 수밖에 없는 개념이기도 합니다.

list-units

systemctl list-units
실행중인 유닛 목록을 확인합니다.

systemctl list-units --all
'모든' 유닛 목록을 확인합니다. 여기에는 실행중이지 않은 유닛들도 포함됩니다.

systemctl list-units --all --state=inactive
실행중이지 않은 유닛 목록을 확인합니다.

systemctl list-units --failed
로드에 실패한 유닛 목록을 확인합니다.

list-dependencies

systemctl list-dependencies nginx.service
nginx 서비스의 의존성 트리를 확인합니다.

status

systemctl status
모든 유닛들의 상태를 확인합니다.

systemctl status bluetooth.service
단일 유닛의 상태를 확인합니다.

systemctl start/stop/restart/enable/disable apache.service
단일 유닛을 시작시키거나/멈추거나/재시작시키거나/활성화시키거나/비활성화시킵니다.

cat

systemctl cat httpd.service
설정파일의 전문을 출력합니다.

show

systemctl show httpd.service
적용된 설정을 출력합니다.

reboot/poweroff

sudo systemctl reboot/poweroff
시스템을 재부팅/종료하고 파워를 끊습니다.

Reference

0개의 댓글