What’s your first stop when a Linux service stops working?

Unison

Well-known member
VIP
I’m still learning Linux, and one of the most useful commands I’ve picked up is:

systemctl status pihole-FTL

It shows whether the service is running and often gives you the first clue about why it failed. If I need more detail, I can then check its log with journalctl -u pihole-FTL

I like that this gives me somewhere sensible to start instead of changing settings at random. What’s the first command or check you use when troubleshooting a service?
 
Sorry I can't help you with that one, the only one time I had a crash I used Timeshift to step back and everything went OK from there even after repeating the step I believed caused the issue.
 
Sorry I can't help you with that one, the only one time I had a crash I used Timeshift to step back and everything went OK from there even after repeating the step I believed caused the issue.
Thanks. 👍 That’s actually a good example of why Timeshift is worth having set up. Being able to roll back to a known-good point after something goes wrong can save a lot of messing about trying to work out exactly what changed.

Interesting that you repeated the same step afterwards and it worked fine as well — sometimes Linux keeps us guessing! 😄
 
First thing should be to review the logs;

cat /var/logs or wherever it's located
tail -f 100 /var/logs

I think that shows you the last 100 logs.

Code:
sudo systemctl restart <service_name>
 
First thing should be to review the logs;

cat /var/logs or wherever it's located
tail -f 100 /var/logs

I think that shows you the last 100 logs.

Code:
sudo systemctl restart <service_name>
Thanks, I've been having a play with this on my Manjaro system.

ls /var/log

shows me the logs available, then for example:

tail -n 100 /var/log/pacman.log

shows the last 100 lines, and:

tail -f /var/log/pacman.log

lets me watch the log live as new entries are added.

Another useful bit of Linux learned 👍

I must admit, since moving over to Manjaro I've been really impressed with it. So far I've had no problems with the system itself, apart from the printer issue which is all sorted and working now. That's despite everything I've thrown at it and all the different things I've been trying while learning Linux. 👍
 
Back
Top