Chapter 9 Controlling Services and Daemons

  1. What are daemons?
    Processes that either wait or run in the background, performing various tasks.
  2. When do daemons start?
    Usually at boot time and continue to run until they are manually stopped
  3. What is the naming convention for names for many daemons programs to end with?
    The letter d.
  4. What does a service in the system sense often refer to?
    One or more daemons.
  5. Oneshot
    When you leave a daemon process running after changing the state of another.
  6. What is the first process that starts PID1?
    systemd
  7. What does systemd provide?
    • Parallelization capabilities (starting multiple services simultaneously), which increase the boot speed of a system.
    • • On-demand starting of daemons without requiring a separate service.
    • • Automatic service dependency management, which can prevent long timeouts. For example, a network-dependent service will not attempt to start up until the network is available.
    • • A method of tracking related processes together by using Linux control groups.
  8. What does systemd use to manage objects?
    Units
  9. What units are .service?
    .service extension and represent system services. This type of unit is used to start frequently accessed daemons, such as a web server.
  10. What are .socket?
    .socket extension and represent inter-process communication (IPC) sockets that systemd should monitor. If a client connects to the socket, systemd will start a daemon and pass the connection to it. Socket units are used to delay the start of a service at boot time and to start less frequently used services on demand.
  11. What is a .path service unit?
    are used to delay the activation of a service until a specific file system change occurs. This is commonly used for services which use spool directories such as a printing system.
  12. Which command is used to manage service units?
    systemctl
  13. How do you see the available service types from the terminal?
    systemctl -t help
  14. Columns in the systemctl list-units command output?
    • Unit - The service unit name
    • Load - Whether systemd properly parsed the unit's configuration and loaded the unit into memory
    • Active - The high-level activation state of the unit. This information indicates whether the unit has started successfully or not.
    • Sub - The low-level activation state of the unit. This information indicates more detailed information about the unit. The information varies based on unit type, state, and how the unit is executed.
    • Description - The short description of the unit.
  15. What does systemctl list-units display?
    The systemctl list-units command displays units that the systemd service attempts to parse and load into memory; it does not display installed, but not enabled, services.
  16. How do you view a specific unit?
    systemctl status name.type
  17. How do you view the state of all unit files installed?
    systemctl list-unit-files
  18. How do you verify that a service is active?
    systemctl status is-active sshd.service
  19. How do you verify that a service is enabled?
    systemctl status is-enabled sshd.service
  20. How do you verify that a service failed during startup?
    systemctl is-failed sshd
  21. How do you list all failed units?
    systemctl --failed
  22. Who starts services as needed?
    systemd or systemctl
  23. What does masking a service do?
    Masking a service prevents an administrator from accidentally starting a service that conflicts with others.
  24. What is created when you mask a service?
    A link in the configuration files to /dev/null preventing the service from starting.
  25. What does systemd do to enable and disable services at boot?
    It creates links to prevent the services from starting at boot. systemctl removes them.

    systemctl start sshd.service
  26. Does enabling a service start the service?
    No. The service will only start at reboot. You must use systemctl start sshd.service
  27. How do you prevent a service from starting at boot?
    systemctl disable sshd.service
  28. What does systemctl list-dependencies UNIT do?
    List units required and wanted by the specified unit.

    systemctl list-dependencies sshd.service
Author
andres666
ID
354909
Card Set
Chapter 9 Controlling Services and Daemons
Description
RHCSA
Updated