Your Webhosting Questions
Answered by the Webhosting Experts
Tags
...
...

How to Find Which Process Uses Which Port

One of the common tasks for Linux users is to find out which process is using a particular network port. This can help troubleshoot network or application issues, such as web servers not responding or conflicting services. There are several commands that can show the processes and ports in use on a Linux system, such as the ones listed below.

netstat

Netstat is a command-line tool for network statistics. It can display information about open sockets, routing tables, and connection details. It can also show which ports are in use and which processes are using them. Netstat supports different protocols, such as TCP, UDP, and UNIX. Netstat can help troubleshoot network problems and monitor network activities.

Use the following command to find which service is using the port number of choice. For example, in the command below we are looking for port 80 and which services are using it.

netstat -tulpn | grep :80

Screenshot showing the results of the netstat -tulpn | grep :80 command.

lsof

The lsof command is a useful tool for Linux system administrators. It stands for “list open files” and it can show information about files that are opened by processes on the system. Files can include regular files, directories, devices, sockets, pipes, and more. 

Same as the previous example, in the command below we are looking for services using port 80.

lsof -i :80

Screenshot showing the results of the command lsof -i :80.

Need More Personalized Help?

If you have any further issues, questions, or would like some assistance checking on this or anything else, please reach out to us from your my.hivelocity.net account and provide your server credentials within the encrypted field for the best possible security and support.

If you are unable to reach your my.hivelocity.net account or if you are on the go, please reach out from your valid my.hivelocity.net account email to us here at: support@hivelocity.net. We are also available to you through our phone and live chat system 24/7/365.

Tags +
...