This article is a mirror article of machine translation, please click here to jump to the original article.

View: 14713|Reply: 1

[linux] Linux Remote Installation WDLinux No longer worries about accidental disconnection or compilation of MySQL stuck for a long time

[Copy link]
Posted on 1/18/2017 1:31:30 PM | | |

SSH Remote Session Management Tool - Screen tutorial
1. What is the screen command?
Screen is a full-screen window manager that allows you to multiplex a physical terminal between multiple processes. In Screen, there is a concept of a session, where users can create multiple screen windows in a screen session, and in each screen window it is like operating a real telnet/SSH connection window.
[With Screen, you only need to execute sh in.sh, you can turn off ssh to drink tea, go out to do errands, or use the computer to play other things, office or something! ] Don't worry about the installation progress!
The installation time of wdlinux is about 2-5 hours! Just reconnect to ssh every 2 hours and resume the Screen session to see if the compilation and installation are complete! You don't need to look at the whole installation process, just hand it over to Screen to execute! 】

2. How to install screen command?
Except for some streamlined systems or customized systems, most of them have the screen command installed, if not installed, the CentOS system can execute: yum install screen ;
Debian/Ubuntu system execution: apt-get install screen.

3. How to use the screen command?

1. Commonly used methods
1.1 Create a screen session
You can run screen -S lamp first, and screen will create a session named lamp.

[After creating the lamp session, you can perform the installation.,sh in.sh Enter the combination serial number to be installed after execution.,Then it will be fully automatic installation until the installation is completed.,
During this period, you can turn off SSH at any time, or your own computer, and the installation process will still be carried out on the server side]

1.2 Leave or close the ssh reply, and keep the task or program in the screen session to continue
When you need to leave temporarily (the program in the session will not be closed and is still running), you can use the shortcut key Ctrl+a d (i.e. hold Ctrl, then press a and d)

1.3 Resume the screen session and you will see that it is still performing the installation without stopping!
When you come back, you can perform the execution: screen -r lamp to revert to the working interface of the lamp session you created before leaving.

If you forgot the Scerrn session name you created, or if you didn't specify the session name at that time
It can be executed: screen -ls screen will list the list of currently existing sessions, 11791.lnmp is the lamp session created for the screen just now, and the lamp session has been temporarily exited, so the status is Detached, when screen -r lamp is used, the status will change to Attached, 11791 is the process ID of the session of this screen, and it can also be used when resuming the session: screen - r 11791

1.4 Closing the Screen Session
Execute: exit will prompt: [screen is terminating], indicating that the screen session has been successfully exited.

3. Commonly used shortcut keys
Ctrl+a c : Create a window in the current screen session
Ctrl+a w : Window list
Ctrl+a n: Next window
Ctrl+a p : Previous window
Ctrl+a 0-9: Switch between window 0 and 9




Previous:PowerShell utilizes the WebClient to download files
Next:MFC design
 Landlord| Posted on 7/9/2024 10:06:36 PM |
Use screen to manage your remote sessions
https://www.itsvse.com/thread-4854-1-1.html
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com