Check which program occupies the port

Source: Internet
Author: User
In both Linux and Windows, programs that use ports such as nginx, mysql, and apache cannot be started. The following describes how to check whether a port is occupied by that program on Linux and Windows respectively. Www.2cto. comLinux: use the command lsof-I: occupied...
In both Linux and Windows, programs that use ports such as nginx, mysql, and apache cannot be started. The following describes how to check whether a port is occupied by that program on Linux and Windows respectively. For Linux at www.2cto.com, run the following command: lsof-I: The occupied Port number shows the program and PID of the program. run the command: PID of the kill program. If you are prompted that the lsof command is not installed, CentOS can execute: yum install lsof installation, and Debian can execute: apt-get install lsof installation. Windows: There are many tools on Windows, such as Active Ports. if there is no ready-made tool on hand, run the command netstat-aon | findstr 80, for example, the last column is the program PID, run the tasklist command: tasklist | findstr 2724 and then end the program through task management.
 
Related Article

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.