When you build a server according to your plan and requirements, you want it to run quickly and efficiently, right? But did you know that modern Linux systems, especially those using systemd, often install and run many services by default, even if you don’t need them? These unwanted services consume precious system resources and can even become security risks.
In this article, we’ll walk through how to identify and disable unnecessary services on systemd-based Linux distributions like Fedora, CentOS, Ubuntu, Debian, and others.
Why Should You Care About Unwanted Services?
When you install Linux, the OS typically enables several services automatically. For example, you might end up with web servers, FTP servers, print servers, or network services running without you asking for them. But if your server doesn’t need those, they’re just wasting CPU, memory, and opening attack surfaces.
Before disabling services, ask yourself:
- What do I actually need this server to do?
- Do I want it to run a web server?
- Do I need FTP or Samba shares?
- Am I running DNS or database servers?
Only enable the services that support your server’s purpose.
Check Which Services Are Running
With systemd, managing and checking services is easier than ever, here’s how to list the active services on your system.
List all Running Services
To list all active and running services, you can use the following systemctl command.
sudo systemctl list-units --type=service --state=running

Take a close look at the running services. If a service isn’t essential for your server’s purpose, it’s best to disable it.
Check Open Ports and Identify Listening Services
To see which services are actively listening for network connections on your server, use one of the following commands: ss or netstat.
sudo ss -tuln OR sudo netstat -tuln

These commands display all TCP and UDP ports currently open and waiting for connections. For example, if you spot port 21 (used by FTP) open but you don’t actually need FTP, it’s a clear sign you should disable that service to keep your server secure and resource-friendly.
Common Unnecessary Services on systemd Systems
Not every service that runs on your Linux machine is something you actually need. Depending on whether you’re using your system as a desktop, server, or virtual machine, many services might be running in the background – quietly hogging memory, CPU, or even opening security holes.
Common Services You Might Not Need
Here’s a list of frequently running services you can review. If you don’t use what they support, disable them.
Service | Description |
---|---|
avahi-daemon |
Zero-configuration networking (local service discovery). |
bluetooth.service |
Manages Bluetooth — useless on headless servers. |
iscsi.service , iscsid.socket , iscsiuio.socket |
For iSCSI network storage. |
lvm2-monitor.service , lvm2-lvmpolld.socket |
For managing LVM volumes. |
mdmonitor.service , raid-check.timer |
Related to software RAID. |
qemu-guest-agent.service |
Only useful if you’re running inside a QEMU/KVM VM. |
nfs-convert.service , nfs-client.target |
For NFS (networked file systems). |
cups.service |
Printing services — likely useless on a server. |
postfix.service |
Mail server — unnecessary unless you’re sending mail. |
sssd.service |
Connects to domains like LDAP or AD. |
hyperv-daemons |
Only needed inside Hyper-V virtual machines. |
apport.service |
Ubuntu’s error reporting tool. |
zeitgeist , telepathy |
Desktop logging and messaging services — not for servers. |
Use the commands below to disable the services listed above:
sudo systemctl disable avahi-daemon sudo systemctl disable bluetooth sudo systemctl disable iscsi sudo systemctl disable iscsid.socket sudo systemctl disable iscsiuio.socket sudo systemctl disable lvm2-monitor sudo systemctl disable lvm2-lvmpolld.socket sudo systemctl disable mdmonitor sudo systemctl disable raid-check.timer sudo systemctl disable qemu-guest-agent sudo systemctl disable nfs-convert sudo systemctl disable nfs-client.target sudo systemctl disable cups sudo systemctl disable postfix sudo systemctl disable sssd sudo systemctl disable hyperv-daemons sudo systemctl disable apport sudo systemctl disable zeitgeist sudo systemctl disable telepathy
Want to stop them immediately too? Just replace disable
with stop
in each command.
How to Identify and Review Services
Not sure what’s running on your system or what starts up automatically? Here are some easy commands to help you figure that out:
To list all enabled services and set them to start when your system boots.
systemctl list-unit-files --type=service --state=enabled
To see running services that are active right now.
systemctl list-units --type=service
To analyze boot time and see which services slow down boot:
systemd-analyze blame
This will show how much time each service takes during boot. Look for anything that takes several seconds and decide if you really need it.
How to Stop and Disable a Service
If you find something you don’t need, you can stop it and prevent it from starting again:
sudo systemctl stop # Stops the service now sudo systemctl disable # Prevents it from starting at boot
To prevent a service from being started manually or as a dependency (mask it)
sudo systemctl mask
If you ever want to bring it back:
sudo systemctl unmask
Final Thoughts
By disabling unwanted services on your Linux server, you free up resources, improve security, and reduce potential attack vectors. Modern systemd makes managing these services straightforward.
Remember, a lean server is a fast server. Take control of what runs on your system. Keep your server focused on the job it was built for.
Stopping, disabling and deleting unwanted services is easy. The big problem is knowing which services are unwanted/unneeded. With literally hundreds of services with cryptic, unintuitive names running on a system at any one time, how is one to know which services are essential and which are superfluous?
Who is the target audience for this article? Sysadmins? They already know which services the want/need running on their systems. This article does nothing for a casual Linux user. It assumes that one already knows what each service does and, therefore, which services can be disabled. Am I expected to Google each and every service to find out if I can stop it?
Hi, you say “FTP to transfer files from one host to another host”
Unclear. Is this client or server? You don’t say. If it’s client, then it’s not “from one host to another”, it’s “connect to a remote FTP server from this machine.” If it’s server, then it’s “accept connections from remote clients.”
I need FTP client, so I’m afraid to remove this – i don’t know if it’s server or client.
thanks
Hi, you say “In the above output, you notice smbd and nmbd“, but i don’t see smbd and nmbd in the above output.
That’s confusing.
Thanks
The most useful tutorial I had never seen before !!
Thank you
I was looking for this and somebody from Debian user forums referred me here thanks..
Nice work bro. Keep it up.
ok well but how to make it permanent block service at reboot etc.. thanks for your help regards
Paul which service/Application you want to block permanently?
You may like to uninstall that specific program or write a script to block and add it to run as start-up application so that no unwanted package keeps on utilizing your system resource.
super tips .. ;)
Thanks @ Minhaj for your feedback.
Hi There,
My Linux network services stops by itself..i don’t know why… when I tried to start by using network service start , it started pinging and working but after an hour it stopped again by itself..what could be the reason?
Please help…
Condense log files for the possible reason.
hi..sir am new bea for linux ..giv me suggestion to me …how to prepare …for interview…
Keep Connected, Keep learning @ Santhosh
thanks for share! nice article~
Thanks for your feedback @ mingmings
In Red Hat based, systemctl seems a more convenient approach than checkconfig.
systemctl disable apache
Or Gentoo.
Very good tips! :)
Thanks for share!
Thanks for the Feedback.
Welcome.
thanks for this. Very helpful article.
welcome @ Bob Crochelt
Mr. Kumar, maybe you should recheck your writing in 4th paragraph from bottom. It should be Debian, not Debain. Thank you.
Sorry, that was a typo, corrected now..
There is a much more simple. Install Arch Linux, make it as you want. Nothing enabled by default ;)