Linux Killing a process occupying a particular port

0 votes

I'm trying to close tomcat. I tried using ./shutdown.sh inside the tomcat /bin directory but it didn't shutdown properly because I couldn't restart the server.

Now I want to kill the tomcat process running on the port 8080. So is there a way to get the process from an occupied port and then kill it.

Apr 3, 2019 in Linux Administration by Atul
• 10,240 points
1,219 views

1 answer to this question.

0 votes

Use the port command to find the process bound on the port, in your case its 8080:

fuser 8080/tcp

to kill the process do:

fuser -k 8080/tcp

answered Apr 3, 2019 by DareDev
• 6,890 points

Related Questions In Linux Administration

0 votes
1 answer

Linux: Efficiently test if a port is Open

$ nc -z <host> <port>; echo $? Use ...READ MORE

answered Jun 12, 2019 in Linux Administration by Shubham
• 13,490 points
552 views
0 votes
1 answer

Killing a Zombie Process

You can clean up a zombie process ...READ MORE

answered Jun 20, 2019 in Linux Administration by Upasana
• 8,620 points
746 views
0 votes
1 answer

How to find Resident Set Size of a process in Linux?

Hi@akhtar, RSS is a memory currently used by ...READ MORE

answered Oct 12, 2020 in Linux Administration by MD
• 95,440 points
1,351 views
0 votes
0 answers

How can I kill a process by name instead of PID, on Linux?

Sometimes when I try to start Firefox ...READ MORE

Apr 13, 2022 in Linux Administration by Rahul
• 9,670 points
247 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How do I set variable if a specific package version is installed in CFEngine?

Here is what you can do.Just use packagesmatching to ...READ MORE

answered Jul 12, 2018 in Other DevOps Questions by Atul
• 10,240 points
967 views
0 votes
2 answers

Install postgreSQL on Ubuntu

Follow the below commands to install PostgreSQL (PSQL) ...READ MORE

answered Nov 12, 2020 in Database by Prachi
• 140 points
938 views
0 votes
1 answer

How to find the group associated with a user in linux?

To list all the groups groups or to list ...READ MORE

answered Jun 21, 2019 in Linux Administration by DareDev
• 6,890 points
764 views
0 votes
1 answer

setting a variable output from a bash command

You can use $(command), which in my ...READ MORE

answered Feb 15, 2019 in Linux Administration by DareDev
• 6,890 points
2,194 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP