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:

Or you can try:

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:

You can also try this command:

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:

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

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.

Disable Printing And CUPS.

I don’t print much of anything these days, and haven’t for a long time, and on older hardware I’d disable printing by disabling CUPS. I’ve also found printing enabled on server installs. That doesn’t seem like a good default to me, but I’m definitely not an expert. 

If you don’t need to print, you don’t need the CUPS services running. Today, we’ll discuss disabling it. We could mask the services, like we did in the article about disabling sleep/hibernation. Instead of doing that, we’ll use this as an opportunity to show how to disable a service. That seems like a reasonable choice.

If you don’t know, Linux printing is (usually) controlled by CUPS. CUPS is developed by our friends at Apple. CUPS has actually been around since the late 90s and has pretty much become the default printing system. If you check the man page, it defines itself like:

cups – a standards-based, open source printing system

And the description:

CUPS is the software you use to print from applications like word  processors, email readers, photo editors, and web browsers. It converts the page descriptions produced by your application (put a paragraph here, draw a line there, and so forth) into something your printer can understand and then sends the information to the printer for printing.

If you don’t print from your system, you don’t need the service running. Back when I cared about optimization, this would be something I’d disable. I’m not sure that it ever did much good at making things run faster, but it definitely made me feel like I was doing something!

Disable Printing/CUPS:

Like many other articles on this site, we need an open terminal. You can open a terminal with your keyboard – just press CTRL + ALT + T. That should do it!

Now, with your terminal open, we just need to enter a few commands. Just in case, we should first make sure to stop any of the printing services. To do that, you run the following:

If you did it right, you’ll get no feedback. We also need to stop ‘browsed’ (the daemon that broadcasts/receives broadcasts from remote printers) with:

Again, nothing should show up on your screen. You’re also done stopping any of the printing services and the next step will be to disable those services. It’s pretty easy – you just replace the stop with disable. It looks like this:

And again for the daemon:

That should do it, actually. You should now no longer be able to print from your device. This could even be an additional security setting for times when you don’t want basic users to be able to print sensitive information while still keeping a printer up on the network. If the system can’t print, you don’t have to worry about them acquiring the print credentials. For those who’ve covered the costs of a ‘print room’, you might even see some benefits on the bottom line!

Closure:

See? That was a nice and easy article. It’s not even all that long! Heck, the stuff around the commands is more complicated than the commands themselves! Now that I think about it, that kinda describes a bunch of these articles. I can’t write essays every day! Besides, who would read them?!?

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.

Linux Tips
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.