|
Unit
|
Extension
|
Purpose
|
|
Service
|
.service |
Background service/daemon
|
|
Target
|
.target |
Group of units (runlevel replacement)
|
|
Socket
|
.socket |
Socket activation
|
|
Timer
|
.timer |
Scheduled task (cron alternative)
|
|
Mount
|
.mount |
Automatically mount filesystem
|
|
Automount
|
.automount |
Hardware devices
|
|
Device
|
.device |
Hardware devices
|
|
Path
|
.path |
Monitor file/directory changes
|
|
Swap
|
.swap |
Swap device
|
|
Scope
|
.scope |
External processes
|
|
Slice
|
.slice |
Resource grouping
|
systemctl list-units -> Running unitssystemctl list-unit-files -> Installed unit files
|
Command
|
Purpose
|
systemctl status |
View service status
|
systemctl start |
Start service
|
systemctl stop |
Stop service
|
systemctl restart |
Restart service
|
systemctl reload |
Reload configuration
|
systemctl enable |
Start at boot
|
systemctl is-enabled |
Check boot status
|
systemctl mask |
Prevent service from starting
|
systemctl unmask |
Remove mask
|
systemctl daemon-reload |
Reload unit files
|
systemctl isolate |
Switch target
|
|
Command
|
Purpose
|
journalctl |
View logs
|
journalctl -u sshd |
Logs for a service
|
journalctl -xe |
Recent errors
|
journalctl -f |
Follow logs live
|
journalctl -b |
Current boot logs
|
|
State
|
Meaning
|
|
Active
|
Currently running
|
|
Inactive
|
Not running
|
|
Enabled
|
Starts automatically at boot
|
|
Disabled
|
Does not start automatically
|
|
Masked
|
Cannot be started
|
|
Failed
|
Service encountered an error
|
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.