Comments on Starts systemd service and follow log
Parent
Starts systemd service and follow log
+1
−0
I can start services with systemctl start
. I can see logs with systemctl status
or journalctl
. But by the time I run the second the process has already started. I'd like to start
a service and immediately be dropped into the live log from it, similar to docker run
for example. How can I do this?
Currently I open two terminal windows, and run journalctl continuously in one.
Post
+0
−3
You can use the --follow
option of systemctl
to start a service and immediately tail the log file.
Here's an example command that starts the myservice service and follows the log:
sudo systemctl start-follow myservice
0 comment threads