Home >Operation and Maintenance >Linux Operation and Maintenance >How to check which process is occupying port 80 in Linux

How to check which process is occupying port 80 in Linux

尊渡假赌尊渡假赌尊渡假赌
尊渡假赌尊渡假赌尊渡假赌Original
2023-07-11 15:49:255479browse

Linux can use the lsof command to check the occupancy of port 80. The specific steps are: 1. Open the terminal; 2. Run the "sudo lsof -i :80" command to check the processes occupying port 80.

How to check which process is occupying port 80 in Linux

The operating system of this tutorial: Linux5.18.14 system, Dell G3 computer.

On Linux, you can use the lsof command to see which process is occupying a specific port. The following are the specific steps:

1. Open the terminal.

2. Run the following command to view the processes occupying port 80:

 sudo lsof -i :80

If port 80 is occupied, a list of processes using this port will be displayed.

If the lsof command is not installed, you can install it through a package manager (such as apt, yum, etc.). Please choose the corresponding command according to your Linux distribution.

Also, if you just want to view the processes and programs currently listening on all ports, you can use the following command:

sudo netstat -tlnp

This will display all listening ports and their related process information. You can find the process corresponding to port 80 in the output.

The above is the detailed content of How to check which process is occupying port 80 in Linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn