December 2018
Beginner
826 pages
22h 54m
English
In this section, we're using the systemctl command to query systemd.
We'll get gradually more granular with our requests, until we've eventually built a query that shows us only what we want to see, that being services that are running right-this-second.
There's an argument to be made for using pipes and grep to accomplish what you want and, depending on your preference, you may find one of these two commands neater than the other, though they accomplish roughly the same thing:
$ systemctl --no-pager | grep service | grep running | column -t
In the previous, we're first printing the default "all" list from systemctl, then we're passing it through grep a couple of times to filter what we want, and finally we're displaying it ...