Check the program that occupies a port in ubuntu

Source: Internet
Author: User

Run the netstat command to check the port usage of a program that occupies a port in ubuntu. View the connected service port (ESTABLISHEDnetstat-a) view all service ports (LISTEN, ESTABLISHED) netstat-ap view port 8080, you can combine the grep command: netstat-ap | grep 8080: If you want to view port 8888, enter lsof-I: 8888 in the terminal. To stop using this port, run the "top" command on the "terminal" using the kill + pid to view the tasks that occupy the most system resources. Press "q" to exit. Run "ps aux" to view all running tasks (called "processes "). If you want to find a specific process, you can run: ps aux | grep program name. If you want to end the process, you can run: kill-9 process number (process number is the four-digit number in the second column you see when running the ps command)

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.