Screen implementation to continue running code after SSH is closed

Source: Internet
Author: User

This article is based on Ubuntu 14. 04

Use SSH to connect to the remote server, start the service, after exiting SSH, the service is terminated, using screen can solve the problem.

1. Install screen

Apt-get Install screen

2, after the installation is complete, enter the screen command, according to the prompt to enter the new interface by space

3, like before starting the Meteor project, enter the directory, start the Meteor project

Cd/home/meteor/hello

Meteor

4, after the completion of access to the project http://ip:3000, success. Close the SSH window, continue access, and still succeed.

5. Enter SSH again to view the services that have been opened

Screen-ls

After execution, the running sub-interface is listed, and the sub-interface running by the service is viewed

Screen-ls sub-Interface code, enter the console of the running sub-interface

6, will also encounter the failure to enter the sub-interface, the following error is indicated

There is no screen to be resumed matching 6556

7, Input Command reply

Screen-d 6556

8, again into the sub-interface, because there is only one sub-interface, you can enter screen-r directly into

9, after entering the sub-interface, the command to return to the main interface is ctrl+a,d first input CTRL + A and then enter D

Screen implementation to continue running code after SSH is closed

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.