systemctl은 systemd를 제어하는 가장 자주 쓰는 명령.
서비스 시작·중지·상태 확인·자동 시작 설정 등 일상의 시스템 관리.
기본 — 서비스 제어.
sudo systemctl start nginx — 시작.
stop — 중지.
restart — 재시작.
reload — 설정 다시 읽기(중지 없이).
status nginx — 현재 상태 + 최근 로그.
자동 시작.
systemctl enable nginx — 부팅 시 자동 시작 등록.
disable — 등록 해제.
is-enabled로 확인.
start와 enable은 다른 일 — start만 하면 부팅 후 안 시작됨.
시스템 동작.
systemctl reboot — 재부팅.
poweroff — 종료.
suspend — 슬립.
hibernate — 동면.
옛 reboot·shutdown 명령 대신 통합.
목록·정보.
systemctl list-units — 모든 단위.
list-units --type=service — 서비스만.
list-unit-files — 활성/비활성 모두.
systemctl cat nginx — 서비스 정의 보기.
systemctl edit nginx — 오버라이드 편집(원본 안 건드리고 추가).
한 줄 요약
systemctl로 systemd 제어.
start/stop/restart/reload/status가 일상, enable/disable로 자동 시작.
reboot·poweroff도 통합.
list-units·cat·edit으로 정보·편집.
더 알아볼 것
- systemctl --user — 사용자 단위
- systemctl mask — 완전 차단
- drop-in 디렉토리 — *.d/