Tips

How To: Show systemd Services

Today we’re going to have a quick and easy article, one where I show you how to show systemd services. We’ll explore a way to show all services and those services that are currently running. It’ll be nice and easy. 

At this point, systemd isn’t really all that controversial. It was for a while and there are still some people who work kinda hard to not use systemd. That’s their right and I support their choices, but I dare say that most of us now use systemd and that aiming articles at the majority is a good idea. So, I have no problem covering systemd stuff – and I have even less trouble treating it as though systemd is the default.

It’s kinda hard to pin down a definition for systemd. It’s far more than an init system, which it was replacing fairly early on. It has grown to encompass quite a bit more than that. So, let’s just look at how Wikipedia describes systemd.

systemd is a software suite that provides an array of system components for Linux[6] operating systems. Its main aim is to unify service configuration and behavior across Linux distributions;[7] Its primary component is a “system and service manager”—an init system used to bootstrap user space and manage user processes. It also provides replacements for various daemons and utilities, including device management, login management, network connection management, and event logging.

So, you can see it’s pretty expansive. For this article, we’ll be looking at the service manager aspect and how to show your systemd services. Let’s just jump into the article, so that we can keep it relatively brief.

Show systemd Services:

This article requires an open terminal, like many other articles on this site. If you don’t know how to open the terminal, you can do so with your keyboard – just press CTRL + ALT + T and your default terminal should open. (I say this so very, very often…)

So, I said I wanted to keep this article brief – and there’s really no reason to make it longer, so this is how you show all the myriad systemd services:

systemctl list-units --type=service

Or you can try:

systemctl --type=service

Either one or both of those commands should show you all the systemd services, regardless of what state they’re in. Though it should show you the state of the services listed.

A more useful command for most of us would be for us to show the various systemd services that are currently active. Of course you can do that! It’s Linux! You can do everything! It’s not even hard! Just try this command:

systemctl list-units --type=service --state=active

You can also try this command:

systemctl --type=service --state=active

If you pay attention to the syntax, you can also opt to show those systemd services that are inactive. It’s probably pretty obvious, but try this:

systemctl list-units --type=service --state=inactive

Or you can try this one (’cause you have choices):

systemctl --type=service --state=inactive

So, as you see, you can show the systemd services in total, show the active systemd services, or choose to show the systemd services that are inactive. It’s not a complicated task and there’s no reason to make it seem complicated. As the tag line says, we’re slowly but surely bringing you up to speed!

Closure:

And there you have it. You have a new article! This time you’ve learned how to show all of your assorted services – and to show the services in all their running states. Some folks like to make this sort of thing look complicated, but it’s really very easy. So, enjoy the new article and know that I appreciate your readership.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

KGIII

Retired mathematician, residing in the mountains of Maine. I may be old and wise, but I am not infallible. Please point out any errors. And, as always, thanks again for reading.

Recent Posts

A Quick Look At The Shutdown Command

This is going to be just a quick article about a command many of you…

18 hours ago

Setting Up Coding Environments on Linux for Educational Use

With so many strong attributes, such as robustness and flexibility, Linux stands as a powerful…

3 days ago

View Detailed Hardware Information

There are many tools for showing your hardware information and today we'll get to view…

5 days ago

How To: Install Wine In Lubuntu

Today's article isn't going to be complicated or long as we are going to cover…

7 days ago

Update Python Packages (PIP)

We've had a run of Python packages recently and you can tell that I'm a…

1 week ago

Save A Command’s Output To A File (While Showing It In The Terminal)

The title is the best I can come up with to describe this exercise as…

2 weeks ago