리눅스 서비스 관리 방법 / systemctl 명령어 정리

서비스 사용 방법

서비스 상태 확인

systemctl status 서비스명

서비스 시작

systemctl start 서비스명

서비스 정지

systemctl stop 서비스명

서비스 재시작

systemctl restart 서비스명

서비스 자동시작 설정

자동 시작 여부 확인

systemctl is-enabled 서비스명

자동 시작 설정

systemctl enable 서비스명

enable 해두면 재부팅 시마다 수동으로 시작하지 않아도 됩니다.

자동 시작 해제

systemctl disalbe 서비스명

서비스 등록 방법

아직 서비스를 직접 등록할 일이 없어서 추후 작성 예정입니다.

서비스 파일 생성

vi /etc/systemd/system/서비스명.service

Leave a comment