One command: portrm
$ ptrm fix 8080
Port 8080 in use
java (PID 19432) - Spring Boot
SAFE - development server
Killed PID 19432. Port 8080 is free.
Free port 8080 on macOS
$ lsof -i :8080
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 19432 dev 56u IPv6 0x... 0t0 TCP *:http-alt (LISTEN)
$ kill -9 19432
# Or one-liner:
$ kill -9 $(lsof -ti :8080)
Free port 8080 on Linux
# Using ss
$ ss -tlnp | grep :8080
LISTEN 0 100 *:8080 *:* users:(("java",pid=19432,fd=56))
$ kill -9 19432
# Using fuser (one-liner)
$ fuser -k 8080/tcp
Free port 8080 on Windows
> netstat -ano | findstr :8080
TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 19432
> taskkill /PID 19432 /F
What commonly uses port 8080?
| Application | Why Port 8080 |
|---|---|
| Spring Boot | Default embedded Tomcat port |
| Apache Tomcat | Default HTTP connector port |
| Jenkins | Default web UI port |
| Nginx (alt) | Common non-root HTTP port |
| Express.js | Common backend API convention |
| Kubernetes dashboard | Port-forward target |
| Docker containers | Common host mapping port |
Why port 8080 instead of 80?
Port 80 is the standard HTTP port, but binding to ports below 1024 requires root/admin privileges on most operating systems. Port 8080 is the conventional alternative that does not require elevated permissions, making it the default for Java application servers and development environments.
Change the default port
Spring Boot
# application.properties
server.port=9090
# Or via command line
$ java -jar app.jar --server.port=9090
Tomcat
<!-- conf/server.xml -->
<Connector port="9090" protocol="HTTP/1.1" />
Express.js
$ PORT=9090 node server.js
Free port 8080 in one command
portrm identifies Spring Boot, Tomcat, Jenkins, and 40+ services. Kill safely with confidence.