Skip to content

Instantly share code, notes, and snippets.

@yanbab
Created November 20, 2020 09:23
Show Gist options
  • Save yanbab/78650eda72f08376e3a0549aae23f7f3 to your computer and use it in GitHub Desktop.
Save yanbab/78650eda72f08376e3a0549aae23f7f3 to your computer and use it in GitHub Desktop.
Systemd Cheat Sheet

Services (systemctl)

systemctl stop apache2
systemctl start
systemctl 

Logs (journalctl)

Read entries from specific unit

journalctl -u apache.service

Read entries since boot

journalctl --boot

Tail the journal

journalctl -f
journalctl -u apache.service -f

Control

systemctl reboot
systemctl halt
systemctl resume
systemctl emergency  # Put in emergency mode
systemctl default    # Exit emergency mode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment