Linux view ports are occupied

Source: Internet
Author: User

Linux view ports are occupied

1, Lsof-i: Port number is used to view the occupancy of a port, such as viewing 8080 ports usage, lsof-i:8080

If you execute the lsof-i:8080 system prompt:-bash:lsof: Command not found, install lsof using yum install lsof such as: The installation is complete and then you can see the situation that was occupied by 8080

Lsof-i

Lsof Output Information Meaning:

COMMAND: The name of the process

PID: Process Identifier

USER: Process Owner

FD: File descriptor application identifies files through file descriptors

Type: File type

DEVICE: Specifies the name of the disk

Size: Sizes of files

Node: Index node

Name: Open the exact name of the file

Lsof-i: Port number

End process directly kill-9 process number.

2.NETSTAT-TUNLP |grep port number, view the process of the specified port number, view Port 22, NETSTAT-TUNLP |grep 22

Linux view ports are occupied

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.