> systemd

Manage Linux services with systemd. Use when a user asks to create a system service, run an app on boot, manage background processes, set up timers (cron replacement), or configure service dependencies and auto-restart.

fetch
$curl "https://skillshub.wtf/TerminalSkills/skills/systemd?format=md"
SKILL.mdsystemd

systemd

Overview

systemd manages Linux services — start, stop, restart, enable on boot, and monitor processes. It replaces init scripts with declarative unit files. Handles dependencies, auto-restart, logging (journald), resource limits, and timers (cron replacement).

Instructions

Step 1: Create a Service

# /etc/systemd/system/myapp.service — Node.js app as a system service
[Unit]
Description=My Node.js Application
After=network.target postgresql.service
Wants=postgresql.service

[Service]
Type=simple
User=deploy
Group=deploy
WorkingDirectory=/opt/myapp
ExecStart=/usr/bin/node dist/server.js
Restart=always
RestartSec=5
Environment=NODE_ENV=production
Environment=PORT=3000
EnvironmentFile=/opt/myapp/.env

# Security hardening
NoNewPrivileges=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/opt/myapp/uploads

# Resource limits
MemoryMax=512M
CPUQuota=80%

[Install]
WantedBy=multi-user.target

Step 2: Manage Service

sudo systemctl daemon-reload          # reload after editing unit files
sudo systemctl enable myapp            # start on boot
sudo systemctl start myapp             # start now
sudo systemctl status myapp            # check status
sudo systemctl restart myapp           # restart
sudo systemctl stop myapp              # stop
journalctl -u myapp -f                 # view live logs
journalctl -u myapp --since "1 hour ago"  # recent logs

Step 3: Timer (Cron Replacement)

# /etc/systemd/system/backup.timer — Run backup daily at 3 AM
[Unit]
Description=Daily Backup Timer

[Timer]
OnCalendar=*-*-* 03:00:00
Persistent=true

[Install]
WantedBy=timers.target
# /etc/systemd/system/backup.service — The actual backup job
[Unit]
Description=Database Backup

[Service]
Type=oneshot
User=deploy
ExecStart=/opt/scripts/backup.sh
sudo systemctl enable --now backup.timer
systemctl list-timers                    # list active timers

Guidelines

  • Always run daemon-reload after changing unit files.
  • Use Restart=always for production services — systemd auto-restarts on crash.
  • journalctl -u service -f is the primary log viewer — replaces checking log files.
  • Timers are better than cron: persistent (catch up missed runs), dependency-aware, logged.

> related_skills --same-repo

> zustand

You are an expert in Zustand, the small, fast, and scalable state management library for React. You help developers manage global state without boilerplate using Zustand's hook-based stores, selectors for performance, middleware (persist, devtools, immer), computed values, and async actions — replacing Redux complexity with a simple, un-opinionated API in under 1KB.

> zoho

Integrate and automate Zoho products. Use when a user asks to work with Zoho CRM, Zoho Books, Zoho Desk, Zoho Projects, Zoho Mail, or Zoho Creator, build custom integrations via Zoho APIs, automate workflows with Deluge scripting, sync data between Zoho apps and external systems, manage leads and deals, automate invoicing, build custom Zoho Creator apps, set up webhooks, or manage Zoho organization settings. Covers Zoho CRM, Books, Desk, Projects, Creator, and cross-product integrations.

> zod

You are an expert in Zod, the TypeScript-first schema declaration and validation library. You help developers define schemas that validate data at runtime AND infer TypeScript types at compile time — eliminating the need to write types and validators separately. Used for API input validation, form validation, environment variables, config files, and any data boundary.

> zipkin

Deploy and configure Zipkin for distributed tracing and request flow visualization. Use when a user needs to set up trace collection, instrument Java/Spring or other services with Zipkin, analyze service dependencies, or configure storage backends for trace data.

┌ stats

installs/wk0
░░░░░░░░░░
github stars17
███░░░░░░░
first seenMar 17, 2026
└────────────

┌ repo

TerminalSkills/skills
by TerminalSkills
└────────────

┌ tags

└────────────