Systemd: Difference between revisions
Jump to navigation
Jump to search
(→logs) |
|||
Line 13: | Line 13: | ||
= logs = | = logs = | ||
journalctl -u service | [https://www.digitalocean.com/community/tutorials/how-to-use-journalctl-to-view-and-manipulate-systemd-logs How To Use Journalctl to View and Manipulate Systemd Logs] | ||
To filter by unit (a unit can be all kinds of stuff) | |||
journalctl -u service|username|groupname | |||
show all information (instead of truncated) | |||
journalctl -a | |||
to throw the output to stdout instead of the less pager | |||
journalctl --no-pager | |||
to follow output live | |||
journalctl -f |
Revision as of 14:54, 12 April 2019
services
You can use the service or systemctl commands to work with these. Apparently systemctl is more direct and service is a wrapper script.
systemctl start|stop|restart|status service
To find out if a service is enabled / will start up at boot
systemctl is-enabled service
To enable|disable it at boot
systemctl enable|disable service
logs
How To Use Journalctl to View and Manipulate Systemd Logs
To filter by unit (a unit can be all kinds of stuff)
journalctl -u service|username|groupname
show all information (instead of truncated)
journalctl -a
to throw the output to stdout instead of the less pager
journalctl --no-pager
to follow output live
journalctl -f