Difference between SysV

  • SysV starts services inorder
  • systemd starts services in parallel (cuz of this boot up is usually faster)

Why SystemD

Systemd Unit File types

  • to check all types of units that are available
systemctl -t help

|500

  • Service units are used to start processes
  • Socket units monitor activity on a port and start the corresponding Service unit when needed
  • Timer units are used to start services periodically
  • Path units can start Service units when activity is detected in the file system
  • Mount units are used to mount file systems
  • Other unit types are available, though less relevant for RHCSA SystemD Timers

To check only the timer units

systemctl list-units -t timer
systemctl list-units -t <type of units>

check files with specific name

systemctl list-unit-files logrotate.*
 

check status of units

systemctl status logrotate.service
systemctl status logrotate.timer

See the configuration of units

systemctl cat sysstat-collect.timer

Configuration Files

[etc,run,usr/lib]/systemd/system
s```
 
 
![](https://i.imgur.com/7CNJLlz.png)
 
 
 
## Unit Files
 
- `Type=oneshot` can be used to start any command through systemd
 
![[SystemD-20250103.png]]
 
 
## Commands
 
```bash
systemctl enable --now <service>
systemctl disable --now <service>
  • systemctl reload will reload the unit configuration without restarting the unit
  • systemctl restart restarts the unit after which the process it manages gets a new PID