리눅스 systemctl

(CentOS systemctl에서 넘어옴)

1 개요[ | ]

리눅스 systemctl
/usr/bin/systemctl
목록 systemctl list-units
시작 systemctl start 서비스
정지 systemctl stop 서비스
재시작 systemctl restart 서비스
리로드 systemctl reload 서비스
상태보기 systemctl status 서비스
활성화확인 systemctl is-enabled 서비스
활성화 systemctl enable 서비스
비활성화 systemctl disable 서비스
마스크 systemctl mask 서비스
언마스크 systemctl unmask 서비스

2 실행예시[ | ]

  • 기본 명령어는 list-units와 동일
root@localhost:~# systemctl list-units | cat
  UNIT                                                                                      LOAD   ACTIVE SUB       DESCRIPTION
  proc-sys-fs-binfmt_misc.automount                                                         loaded active running   Arbitrary Executable File Formats File System Automount Point
  sys-devices-pci0000:00-0000:00:03.0-virtio0-net-eth0.device                               loaded active plugged   Virtio network device
  sys-devices-pci0000:00-0000:00:04.0-virtio1-block-vda-vda1.device                         loaded active plugged   /sys/devices/pci0000:00/0000:00:04.0/virtio1/block/vda/vda1
...
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.
221 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.
root@localhost:~# systemctl | cat
  UNIT                                                                                      LOAD   ACTIVE SUB       DESCRIPTION
  proc-sys-fs-binfmt_misc.automount                                                         loaded active running   Arbitrary Executable File Formats File System Automount Point
  sys-devices-pci0000:00-0000:00:03.0-virtio0-net-eth0.device                               loaded active plugged   Virtio network device
  sys-devices-pci0000:00-0000:00:04.0-virtio1-block-vda-vda1.device                         loaded active plugged   /sys/devices/pci0000:00/0000:00:04.0/virtio1/block/vda/vda1
...
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.
221 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.

3 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}