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)