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 in Linux Administration by Atul
• 10,240 points
43 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 by DareDev
• 6,810 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 in Linux Administration by Shubham
• 13,300 points
35 views
0 votes
1 answer

Killing a Zombie Process

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

answered Jun 19 in Linux Administration by Upasana
• 8,530 points
36 views
0 votes
1 answer

How to create a symlink in Linux?

To create a symbolic link, you can ...READ MORE

answered Jan 31 in Linux Administration by Omkar
• 67,660 points
73 views
0 votes
1 answer

generating a list of files with their absolute path in Linux

If you find an absolute path to start with, ...READ MORE

answered May 16 in Linux Administration by Upasana
• 8,530 points
38 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
91 views
0 votes
1 answer

Install postgreSQL on Ubuntu

Installing PostgreSQL on Ubuntu is very simple, ...READ MORE

answered Mar 22 in Database by Nitesh
60 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 20 in Linux Administration by DareDev
• 6,810 points
48 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 in Linux Administration by DareDev
• 6,810 points
87 views