O'Reilly logo

Red Hat Enterprise Linux Server Cookbook by William Leemans

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Starting and stopping systemd services

Although this recipe uses services by their base name, they can also be addressed by their full filename. For example, sshd can be substituted by sshd.service.

How to do it…

The following steps need to be performed to successfully start or stop systemd services:

  1. List all available systemd services, as follows:
    ~]# systemctl list-unit-files --type service
    UNIT FILE                                   STATE   
    atd.service                                 enabled
    auditd.service                              enabled
    auth-rpcgss-module.service                  static  
    autovt@.service                             disabled
    avahi-daemon.service                        disabled
    blk-availability.service                    disabled
    brandbot.service                            static  
    
    ...
    
    systemd-udev-trigger.service                static  
    systemd-udevd.service                       static  
    systemd-update-utmp-runlevel.service        static  
    systemd-update-utmp.service static ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required