Screen is a virtual Terminal manager. We can use it to manage the terminal interface in the background so that when SSH disconnects, there is no need to be afraid of an ongoing operation interruption.
First, installation
sudo apt-get updatesudo apt-get Install screen
Second, use
1. Create a virtual terminal
Use putty to log in to the Raspberry Pi after execution:
Screen-s Terminal1
This creates a terminal named Terminal1.
At this point we can do anything, such as sudo apt-get upgrade, or other long-consuming jobs like compiling kernels and so on.
Press CTRL + A and then press D to save good one virtual terminal, the system will prompt deatached.
SSH or something can be completely disconnected, let the virtual terminal to run itself.
2, access to the terminal has been created
Screen-ls #可以列出已经创建的正在后台运行的终端screen-R #终端名称就可以了 # such as Screen-r Terminal1
3. Complete exit
If the program in a virtual terminal is completed, Screen-r enters the terminal and then executes exit and exits completely.
This way later through SSH to compile the kernel, such as long-time work, no longer afraid of the interruption caused by the operation of the network interrupted.
Screen can be installed on any Linux device, and the operation is the same.
Play the Raspberry Pi-raspberry, use screen to get pi to run.