Sarathlal N

Show the last n lines from systemctl service log - Linux

I need to print the last n lines from a systemctl service log in Linux. The command is given below.

journalctl -u <service name> -n <number of lines> -f --no-pager


journalctl -u my_service_name.service -n 100 -f --no-pager

Recent Posts

  1. Solve "ValueError invalid literal for int() with base 10" - Python
  2. Handling dynamic subdomain with Flask - Python
  3. A minimal example about WordPress object cache
  4. Select random element from a list - Python
  5. Write our first Selenium program with Python 3 & Firefox

Your Questions / Comments

If you found this article interesting, found errors, or just want to discuss about it, please get in touch.