How to check port occupancy in centos system

王林
Release: 2020-03-20 17:39:21
Original
8478 people have browsed it

How to check port occupancy in centos system

Requirements:

Sometimes when you start an application, you will find that the port is already occupied, or you may feel that some ports are not used but find that they are open. At this time we want to know which application/process is using the port.

(Recommended tutorial:centos usage tutorial)

The method is as follows:

You can use netstat or lsof to view it under CentOS.

1,

netstat -nap #会列出所有正在使用的端口及关联的进程/应用
Copy after login

2,

lsof -i :portnumber #portnumber要用具体的端口号代替,可以直接列出该端口听使用进程/应用
Copy after login

Related video tutorial recommendations:linux video tutorial

The above is the detailed content of How to check port occupancy in centos system. 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 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!