Shell Common Commands

Source: Internet
Author: User

PM2:

Start  -----  pm2 Start/bin/www-watch stop   -----  pm2 Stop app_name|  app_id Display Log

View port occupancy and force the release of occupied ports

Sometimes when the software is turned off, the background process dies, causing the port to be occupied.

1. Find the occupied port   1.netstat-tln2. See which program the port belongs to? The port is occupied by  which process -i:80603. Kill the process that occupies the port  based  on the PID kill -9 process ID  

Nginx Service:

To stop the network server, you can enter:    sudo service nginx stop to start the network server, enter:    sudo service nginx start stop, and then start the server again, enter:     sudo service Nginx Restart Restart:    service Nginx Reload

To view Nginx processes:

To view the current port:

Shell Common Commands

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.