DEV Community

Faruk
Faruk

Posted on • Originally published at Medium

Why I Always Disable Unused Linux Services After Installation | by Faruk Ahmed | Sep, 2025

Member-only story

Why I Always Disable Unused Linux Services After Installation

--

Share

A fresh Linux install might feel clean — but behind the scenes, it often starts up services you don’t actually need. Each one is another open door, another potential exploit, and another log entry you have to monitor.

That’s why one of my first hardening steps is simple: disable everything I’m not using.

🚨 The Risk of Unnecessary Services

  • Attack Surface : Every listening service is a potential entry point.
  • Resource Drain : Idle daemons still consume CPU and memory.
  • Noise in Logs : More services = more clutter, harder to spot real issues.
  • Zero-Day Risk : Even unused software can be hit by future vulnerabilities.

🔍 Step 1: Check Active Services

I start with:

systemctl list-unit-files --type=service --state=enabled 
Enter fullscreen mode Exit fullscreen mode

Or to see running services:

systemctl --type=service --state=running 
Enter fullscreen mode Exit fullscreen mode

Then I cross-check against what the server is actually supposed to do.

🛠 Step 2: Disable What’s Not Needed


👉 Read Full Blog on Medium Here

Top comments (0)