Systemd

From Wiki
Revision as of 17:35, 28 April 2016 by Scott (talk | contribs) (Created page with "{{lowercase title}} == Manage Services == <pre> systemctl start nginx.service systemctl stop nginx.service systemctl restart nginx.service systemctl reload nginx.service </pr...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Manage Services

systemctl start nginx.service
systemctl stop nginx.service
systemctl restart nginx.service
systemctl reload nginx.service

Start on Boot

systemctl enable nginx.service
systemctl disable nginx.service

Services are called "units"

systemctl list-units        # show active services in memory
systemctl list-units --all  # show all services in memory
systemctl list-unit-files   # show all possible units

Reading Logs

journalctl      # show all logs
journalctl -b   # show all logs since last boot
journalctl -k   # show only kernel logs
journalctl -b -u nginx.service  # show logs for a service since boot