Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Linux by (9.5k points)
edited by

When I used ./shutdown.sh to stop the tomcat, it didn’t stop the server properly . Can anyone tell me how to get the list of processes running on a specific port (8080) to kill it? 

1 Answer

0 votes
by (19.7k points)

To get the list of processes which runs on a specific port number with process ID. Use the command below: 

 sudo netstat -plten |grep java

 The output will be: 

tcp6       0      0 :::8080                 :::*                    LISTEN      

1000       30070621    16085/java

 Here the process ID is : 16085(the number before \java) 

 To kill the process 

kill -9 16085 (-9 will kill the process forcefully)

Interested in Linux? Check out this Linux Certification by Intellipaat. 

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Apr 2, 2021 in Linux by sheela_singh (9.5k points)
0 votes
1 answer
asked Feb 18, 2021 in Linux by rahulnayar01123 (6.1k points)

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...