Skip to content
Afa' Afa'

Close a TCP port

Find and kill the process listening on a TCP port with fuser.

1 min read Updated

Summarise this page withyour favorite AI assistant

When a port is already in use, fuser finds and kills the process that is listening on it. This one-liner closes TCP port 8080. The command is below.

close-tcp-port.sh

bash
fuser -k -n tcp 8080
Something wrong or want to discuss this article? Get in touch

Search articles and projects

Type to filter articles and projects. Use the arrow keys to move through results and Enter to open one. Press Escape to close.