When we operate and install the system on the Linux vps ssh command interface or install anything else, novices like me rarely use screen for multitasking operations. For example, to execute a system installation, enter the command and wait there. In case of disconnection or network outage, we have to reinstall it. If you can use the screen command, you can achieve the unattended effect. We can operate multiple tasks at the same time or shut down the machine.
Now Lao Zuo has sorted out the usage methods of screen, so that he can use it easily in the future and share it.
1. Installation method:
yum install screen /* CentOS */
Apt get install screen/* Debian or Ubuntu*/
2. To create a control window:
Screen - S Control window name
3. Hide the current session window:
Press Ctrl+A, release all keys, and then press "D"
4. Restore session window:
Screen - r Control window name/* Restore the session named setup*/
5. Close the session window:
exit
The advantage of screen is that remote operations will not be interrupted due to network problems.