Home > Operation and Maintenance > Linux Operation and Maintenance > How to check which process a linux port is occupied by

How to check which process a linux port is occupied by

coldplay.xixi
Release: 2021-01-25 16:45:13
Original
17009 people have browsed it

How to check which process a Linux port is occupied by: first check the process of the occupied port and query the process ID; then query the process according to the integrated ID and check the process details; finally check the directory where the operation is performed Just process.

How to check which process a linux port is occupied by

The operating environment of this tutorial: red hat enterprise linux 6.1, DELL G3 computer.

How to check which process a Linux port is occupied by:

1. Query the occupied port. First, you need to enter a command to check the process of the occupied port, netstat -tunpl |grep port number

How to check which process a linux port is occupied by

2, query the process ID. Through the above command, you can list which applications this port is occupied, and then find the corresponding process ID,

How to check which process a linux port is occupied by

3. Query the process according to the integration ID. If you want to view this process in detail and which process the ID is, you can view the detailed information of the process through the command, ps -ef|grep process ID

How to check which process a linux port is occupied by

4, View process details. By executing the above command, you can see the detailed information of the process, and you can also see the directory where the process exists, the files executed by the process and other information,

How to check which process a linux port is occupied by

5 , check the directory where the process is located. Through the ll /proc/process ID/cwd command, you can directly view the directory where the process is located, so that you can quickly locate the directory of the process,

How to check which process a linux port is occupied by

7. Operate the process. After searching his new car catalog, you can perform a series of operations on this application, such as restarting, deleting, etc.

How to check which process a linux port is occupied by

Related learning recommendations: linux video tutorial

The above is the detailed content of How to check which process a linux port is occupied by. 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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template