Linux – Which Application Is Using Port 8080
Có thể bạn quan tâm
Menu Always, Java developers need to know which application is using the high demand 8080 port. In this tutorial, we will show you two ways to find out which application is using port 8080 on Linux.
1. lsof + ps command
1.1 Bring up the terminal, type lsof -i :8080
$ lsof -i :8080 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME java 10165 mkyong 52u IPv6 191544 0t0 TCP *:http-alt (LISTEN) Note If multiple result, try lsof -i :8080 | grep LISTEN1.2 PID 10165 is using port 8080, type ps -ef | grep 10165 to find out the application details.
$ ps -ef | grep 10165 mkyong 10165 4364 1 11:58 ? 00:00:20 /opt/jdk/jdk1.8.0_66/jre/bin/java //... -Djava.endorsed.dirs=/home/mkyong/software/apache-tomcat-8.0.30/endorsed -classpath /home/mkyong/software/apache-tomcat-8.0.30/bin/bootstrap.jar: /home/mkyong/software/apache-tomcat-8.0.30/bin/tomcat-juli.jar -Dcatalina.base=/home/mkyong/.IntelliJIdea15/system/tomcat/Unnamed_hc_2 -Dcatalina.home=/home/mkyong/software/apache-tomcat-8.0.30 -Djava.io.tmpdir=/home/mkyong/software/apache-tomcat-8.0.30 /temp org.apache.catalina.startup.Bootstrap startAnswer : IntelliJ IDEA + Tomcat 8 is using the port 8080.
2. netstat + ps command
Just different command to do the same thing.Type netstat -nlp | grep 8080 to get the PID and ps it.
$ netstat -nlp | grep 8080 (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) tcp6 0 0 :::8080 :::* LISTEN 10165/java $ ps -ef | grep 10165 mkyong 10165 4364 1 11:58 ? 00:00:20 /opt/jdk/jdk1.8.0_66/jre/bin/java //...References
- Wikipedia : Lsof command
- Wikipedia : ps command
- Wikipedia : netstat command
- Mac OSX – What program is using port 8080
mkyong
Founder of Mkyong.com, passionate Java and open-source technologies. If you enjoy my tutorials, consider making a donation to these charities.
Label Name* Email* Label Name* Email* 5 Comments Most Voted Newest Oldest Inline Feedbacks View all comments charlie arehart 4 years agoCool tip. But readers should note that if they use either of these to find ports that are in use by a process you did not start yourself, you won’t see them (with lsof at all, or not completely with netstat), so use sudo, etc to elevate your privs. Worked for me. Thanks, mkyong.
3 Reply Sameer 2 years agoVery Very Useful
0 Reply Abdullah Khawer 3 years agoVery useful. Thanks a lot. It helped me. 🙂
0 Reply younes 5 years agogood thanks
0 Reply Alex 6 years agoI have a java process running in 8080, and I cant kill it becuse it automatically restarts. Do you have any idea of the origin of this process, how to trace it back? Kill it? It is running from start up, so its not something I have programmed. Thanks and good post 🙂
0 ReplyRelated Posts
- Linux – How to assign execute permission to a .sh file
- An Introduction to Kernel Live Patching on Linux
- How to block Denial of Service (DoS) with null route
- Grep for Windows – findstr example
- How to install a Vim color scheme
- Debian : Change default Java version
- Ubuntu : Status 14: The disk contains an unclean file system
- Debian – Show apt-get package version

Mkyong.com has provided Java and Spring tutorials, guides, and code snippets since 2008. All published articles are simple, easy to understand, and well-tested in our development environment.
Mkyong.com licenses all source code on this website under the MIT License.
Tools
- Spring Framework
- Quarkus Framework
- Micronaut Framework
- Oracle Java JDK
- Eclipse Temurin JDK
- OpenJDK JDK
- Hibernate ORM
- Maven Build Tool
- Gradle Build Tool
- Tomcat Application Server
- Docker
Links
- Maven Central
- Docker Hub
- Spring Guides
- Quarkus Guides
- Micronaut Guides
- Martin Fowler
- AskPython
About
- About Us
- Code License
- Privacy Policy
- Terms Of Use
- Contact Us
Từ khóa » Http-alt Lsof
-
Understanding What Lsof Socket/port Aliases Refer To - Mark Needham
-
Find Out Which Process Listens On Which Port | Picostitch
-
Which Process Uses Http-proxy 8080 - Unix & Linux Stack Exchange
-
Lsof Port 3000 Code Example
-
How To Kill A Process Running On Particular Port In Linux?
-
How Do I Extract The PID From The Output Of `lsof -i:8080`? - Ask Ubuntu
-
Finding A Process Using A Specific Network Port With The Lsof Command
-
Using Lsof To Determine Which Processes Are Listening On TCP Or ...
-
Check Open And Listening Ports On Linux Using Netstat And Ss
-
Inbound Connections Attributed To Wrong Process #1849 - GitHub
-
Find Process Listening At Port 8080 On Mac OS X - Gists · GitHub
-
How To Kill A Process That Is A Using Port On MacOS - Kevin Sookocheff
-
Find And Kill A Process On A Port | Jake Trent