Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
IT NachrichtenTelekom: Neuer Reise-eSIM-Dienst T-Travel startet weltweit(21.09.2026 um 11:45 Uhr)
IT NachrichtenSamsung Wallet: Neue Banken mit an Bord(21.09.2026 um 13:07 Uhr)
IT NachrichtenTelekom: Neuer Reise-eSIM-Dienst T-Travel startet weltweit(21.09.2026 um 11:45 Uhr)
IT NachrichtenSamsung Wallet: Neue Banken mit an Bord(21.09.2026 um 13:07 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

How to Find and Stop the Process Using a Port on Linux

When you start a service and it fails with address already in use, something else is already holding the port. On a Linux server you can identify that process and stop it in three short steps. This guide uses ss and kill on Ubuntu 22.04,…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

When you start a service and it fails with address already in use, something else is already holding the port. On a Linux server you can identify that process and stop it in three short steps. This guide uses ss and kill on Ubuntu 22.04, but the approach works on any modern distribution.






Step 1 - Find What Is Listening on the Port



Use ss, the modern replacement for netstat, to list the process bound to a port — here, port 8080:




sudo ss -ltnp 'sport = :8080'






The flags read as -l listening sockets, -t TCP, -n numeric ports (don't resolve names), and -p show the owning process. The output ends with a users:(...) field naming the program and its process ID (PID):




State   Recv-Q  Send-Q  Local Address:Port  Peer Address:Port  Process
LISTEN 0 511 0.0.0.0:8080 0.0.0.0:* users:(("nginx",pid=1432,fd=6))






Here the PID is 1432. The sudo matters: without it, ss hides process details for sockets you don't own.






Step 2 - Confirm the Process Before You Touch It



Never kill a PID you haven't looked at. Check what it actually is:




ps -p 1432 -o pid,user,cmd






This prints the full command line and owning user, so you can be sure you're stopping the right thing and not a system service you depend on:




  PID USER     CMD
1432 www-data /usr/sbin/nginx -g daemon on; master_process on;









Step 3 - Stop It Gracefully, Then Forcefully



Ask the process to shut down cleanly first with a TERM signal (the default), which lets it close connections and flush state:




sudo kill 1432






Wait a second or two, then re-run the Step 1 command. If the port is free, you're done. If the process ignored TERM and is still listening, escalate to KILL, which the process cannot trap or ignore:




sudo kill -9 1432






Reserve kill -9 for stuck processes only — it gives the program no chance to clean up, which can leave temporary files or stale sockets behind.






Conclusion



You located the process bound to a port with ss -ltnp, verified it with ps, and stopped it with an escalating kill. Saving sudo ss -ltnp 'sport = :PORT' as a shell alias makes the next "address already in use" error a ten-second fix.

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten How to Find and Stop the Process Using a Port on Linux

Thematisch verwandte Begriffe: Find, Stop, Process, Using · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-94040 | A flaw has been found in vas3k TaxHacker up to 0.8.5. Affected by this v…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick