Kill the process using a port on Linux¶
The quick way¶
portcheck lists what is listening on port 3000 and who started it, asks before stopping
it, and refuses system processes such as systemd and init. It needs no lsof or
net-tools, so it also works in minimal containers. To install it permanently:
brew install roystondwork-dev/tap/portcheck, pipx install portcheck-tool, or the
.deb, .rpm and .apk packages on the releases page (see Install).
To see what's there without stopping it:
With built-in tools¶
No PID shown?
Linux only shows the owner of sockets that belong to your user. If the process
column is empty, the port belongs to another user or root: use
sudo portcheck 3000 (or sudo ss -ltnp).
systemd services¶
If the process comes back right after you stop it, a service manager is restarting it.
Such processes have no started by in portcheck, because the system started them, not a
terminal. Stop the service instead: