How to start a screen session
If Support asks you to run a command that may take a long time, there are a couple of options to ensure that your session continues in the face of network instability.
First, you can run the command from a terminal prompt. From VMware, you can go directly to the VMware Console interface. If that is not available or desirable…
Second, you can run the command from a screen session.
Requirements for screen:
Make sure “screen” is installed
type screen
If this does not return a path, you can install screen with:
yum -y install screen
Note: This KB does not cover installing screen without an internet connection or local repo.
Running screen:
Type this to create a new session. It is nice to give the session a name that is meaningful, especially if you will create multiple sessions.
screen -dmS enumerate
Next, enter the screen session.
While you are in the screen session, your bash history may not look like it did before, so make sure you get any commands you need from bash history before you enter the session.
Now you can run long-running commands without network access breaking your command.
To leave the screen session, type ctl-a d (that’s ctl-a at the same time, release, then the letter d.)
To re-enter the session, type:
To list any active screen sessions, you can type this:
To destroy the screen session- if you don’t need it anymore, for example- you can type
exit
while you are in the screen session.You are free to leave an SSH session- even turn off your computer’s power- and come back into that particular server’s screen session using the
-r [id]
as described above.
© DataCore Software Corporation. · https://www.datacore.com · All rights reserved.