How to Kill a Process Running on Specific Port in Linux?

First of all, we will need to identify the Process ID which runs on any port. Once we find the Process ID, we can kill it using the kill command using PID.

Kill Process running on specific Port :

Below command will kill the process running on Port 3306.

# sudo kill -9 $(sudo lsof -t -i:3306)

Here, sudo lsof -t -i:3306 will give the PID of running process on Port 3306.

# lsof -t -i:3306
2122

Now, as per the above result 2122 is the PID of the processes running on port 3306. We can kill it using below command.

# sudo kill -9 2122

 

  • 0 Users Found This Useful

Was this answer helpful?

Related Articles

Will internal traffic between two VPS viz. a Database Server and a Web Server be counted in my bandwidth usage?

Yes it will. The traffic will be counted in the bandwidth usage of your VPS. Even if you use...

Can I purchase additional RAM, Disk space and Bandwidth for VPS?

Yes, you can purchase additional RAM(Our RAM Recommendation), DiskSpace, Bandwidth and vCPU...

How to install Mongodb in CentOS?

MongoDB is a Free and open-source cross-platform document-oriented database program. Classified...

How to enable sFTP in a Linux VPS?

The SSH File Transfer Protocol (SFTP), also known as the Secure File Transfer Protocol, enables...

How to place Classic VPS order?

This is a video tutorial about selecting an appropriate configuration for your Classic VPS order....