How to check which process is occupying port 80 in Linux

尊渡假赌尊渡假赌尊渡假赌
Release: 2023-07-11 15:49:25
Original
5342 people have browsed it

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
Copy after login

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
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!