brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: snap logs -f follows the output of a snap's services

Snap
~/tips/tip-snap-logs-follow-services

sudo snap logs -f docker

Shows and follows the service logs of an installed snap.

A snap service does not log to the place you expect, so I use the built-in command.

sudo snap logs -n 50 docker
sudo snap logs -f docker

snap logs shows the log output of the services of a snap. By default it prints the last 10 lines, -n sets the number of lines (or all) and -f keeps the output open to follow new entries. Give snap.service, such as lxd.daemon, to pick one service when a snap has several. The Snap documentation runs these commands with sudo, which I do too.

Further reading: Control services (Snap documentation)

More Snap tips snap refresh --list sudo snap save lxd snap services sudo snap stop --disable lxd.daemon sudo snap alias vlc my-vlc All Snap tips (14) All topics

Link