Sobes.tech
Junior — Middle

Kus leida SystemD Unit teenuste töölogisid?

sobes.tech AI

Vastus AI-lt

Journals of SystemD units can be found using the journalctl command. By default, the system journal is stored in 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 as 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 indicates the last 50 lines.

Kus leida SystemD Unit teenuste töölogisid? — DevOps - sobes.tech