↑ ↓ select, Enter open, Esc close

Show journal logs for a single service

Adjust the values, the command updates live
root@server
journalctl -u nginx -n 200 --no-pager

Filters the journal to one unit and prints the last 200 lines without a pager. This is usually the fastest way to the cause when a service fails to start or crashes. Using -f instead of -n 200 shows new messages live.

Note: -u can be given multiple times, for example -u nginx -u apache2, to see how both services interact.

Also searched as

  • show logs of a service
  • why does nginx not start
  • journalctl for one service
  • find mariadb error message

Related one-liners

All in Logs

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.