After the putty is cut off, the program is still running (linux)

Source: Internet
Author: User
For Unix and Linux servers, ssh is often used for maintenance. Some operations are time-consuming, such as updating programs. If you disconnect the ssh connection, the update program will be interrupted. How can we ensure that the update process is still running after ssh is disconnected? There are two methods: (1) nohup # nohup Application name & after that, if you disconnect ssh, the program will still run. The disadvantage of this method is that the application does not have an interactive interface, and the output of the program will output a xxx. out file, and it cannot end in the interface control program in the future. It must be killed. This method is very rude and rarely used. (Http://www.my400800.cn) (2) screen # screen press enter to enter the Screen subinterface, at this time putty title bar will indicate that in the subinterface status, then run your program # Application name, press Ctrl + A, and then press d. switch back to the main interface, and the Putty window title bar will also indicate. # Perform other operations or exit. At this time, ssh is disconnected and the program is still running. After reconnecting to the ssh service, enter # screen-ls to view the code of the sub-interface. Then, enter the # screen-r code to view the sub-interface where your program was originally running.

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.