Junior — Middle
Where can you find logs of SystemD Unit services?
sobes.tech AI
Answer from AI
The logs of SystemD Unit services can be found using the journalctl command. By default, the system journal is stored in a binary format and is accessible through this command.
To view logs of a specific unit, for example nginx.service, use:
journalctl -u nginx.service
Logs may also be stored in the /var/log/ directory in text files, but SystemD primarily uses its own journal.
To view the latest entries, you can use:
journalctl -u unit_name -n 50
where -n 50 shows the last 50 lines.