最終更新:2017-04-25 (火) 02:40:13 (267d)  

systemctl はてなブックマークを見る
Top / systemctl

systemctl (start|stop) httpd.service
systemctl (enable|disable) httpd.service

CentOS 7

コマンド

Apache

  • # systemctl start httpd                   //Apache起動
    # systemctl enable httpd                  //Apacheの自動起動設定 
    # systemctl list-unit-files | grep httpd  //自動起動設定を確認
    # systemctl restart httpd                 //再起動
    # systemctl status httpd                  //ステータス確認

chkconfig -list

  • # systemctl list-unit-files -t service    //自動起動の一覧表示する

Ubuntu 16.04

  • UNIT FILE                                  STATE   
    accounts-daemon.service                    enabled 
    acpid.service                              disabled
    alsa-restore.service                       static  
    alsa-state.service                         static  
    alsa-utils.service                         masked  
    anacron-resume.service                     enabled 
    anacron.service                            enabled 
    apport-forward@.service                    static  
    apt-daily.service                          static  
    autovt@.service                            enabled 
    avahi-daemon.service                       enabled 
    bluetooth.service                          enabled 
    bootlogd.service                           masked  
    bootlogs.service                           masked  
    bootmisc.service                           masked  
    brltty-udev.service                        static  
    brltty.service                             enabled 
    checkfs.service                            masked  
    checkroot-bootclean.service                masked  
    checkroot.service                          masked  
    colord.service                             static  
    console-getty.service                      disabled
    console-setup.service                      static  
    console-shell.service                      disabled
    container-getty@.service                   static  
    cron.service                               enabled 
    cryptdisks-early.service                   masked  
    cryptdisks.service                         masked  
    cups-browsed.service                       enabled 
    cups.service                               enabled 
    dbus-org.bluez.service                     enabled 
    dbus-org.freedesktop.Avahi.service         enabled 
    dbus-org.freedesktop.hostname1.service     static  
    dbus-org.freedesktop.locale1.service       static  
    dbus-org.freedesktop.login1.service        static  
    dbus-org.freedesktop.ModemManager1.service enabled 
    dbus-org.freedesktop.network1.service      disabled
    dbus-org.freedesktop.nm-dispatcher.service enabled 
    dbus-org.freedesktop.resolve1.service      disabled
    dbus-org.freedesktop.thermald.service      enabled 
    dbus-org.freedesktop.timedate1.service     static  
    dbus.service                               static  
    debug-shell.service                        disabled
    display-manager.service                    enabled 
    dns-clean.service                          enabled 
    emergency.service                          static  
    failsafe-x.service                         static  
    friendly-recovery.service                  enabled 
    fuse.service                               masked  
    fwupd-offline-update.service               static  
    fwupd.service                              static  
    fwupdate-cleanup.service                   static  
    getty-static.service                       static  
    getty@.service                             enabled 
    gpu-manager.service                        enabled 
    halt.service                               masked  
    hostname.service                           masked  
    hwclock.service                            masked  
    ifup@.service                              static  
    initrd-cleanup.service                     static  
    initrd-parse-etc.service                   static  
    initrd-switch-root.service                 static  
    initrd-udevadm-cleanup-db.service          static  
    kerneloops.service                         disabled
    keyboard-setup.service                     disabled

ディレクトリ

関連

参考