linux:commands:service

サービス関連

Fedora

$ sudo systemctl start httpd.service

$ sudo systemctl start {httpd,php-fpm}

CentOS 6

$ sudo service httpd start

Fedora

$ sudo systemctl stop httpd.service

$ sudo systemctl stop {httpd,php-fpm}

CentOS 6

$ sudo service httpd stop

Fedora

$ sudo systemctl restart httpd.service

$ sudo systemctl restart {httpd,php-fpm}

CentOS 6

$ sudo service httpd restart

Fedora

$ sudo systemctl reload httpd.service

サービスにHUPシグナルを送って設定を反映させる。

CentOS 6

$ sudo service httpd reload

Fedora

$ sudo systemctl enable httpd.service

$ sudo systemctl enable --now httpd

CentOS 6

$ sudo chkconfig httpd on

Fedora

$ sudo systemctl disable httpd.service

CentOS 6

$ sudo chkconfig httpd off

Fedora

$ systemctl status acpid

$ systemctl status {httpd,php-fpm}

Fedora

$ systemctl -t service --all

CentOS 6

$ chkconfig --list

$ cat /usr/lib/systemd/system/named-chroot.service

Fedora

$ sudo systemctl poweroff
$ sudo systemctl --no-wall poweroff
$ sudo shutdown --poweroff 07:21
$ sudo shutdown --halt +3
$ sudo shutdown -c 
$ sudo systemctl halt
$ sudo systemctl reboot
$ sudo systemctl --no-wall reboot
$ sudo systemctl suspend
$ sudo systemctl hibernate
$ sudo systemctl hybrid-sleep

  • linux/commands/service.txt
  • 最終更新: 2025/04/02 21:01
  • by ともやん