A named GNU screen session maint was detached.
Reconnect to it from another login shell.
Which command is appropriate?
screen -r maint reattaches to an existing detached named session. Processes inside the session can continue after SSH disconnects.
Detailed explanation
screen -S maintIncorrect. screen -S typically creates or selects a session rather than reattaching to a detached one.
Incorrect. screen -S typically creates or selects a session rather than reattaching to a detached one.
screen -r maintCorrect. screen -r maint reattaches the detached session.
Correct. screen -r maint reattaches the detached session.
screen -d /bin/shIncorrect. This starts a session with a command rather than reattaching to maint.
Incorrect. This starts a session with a command rather than reattaching to maint.
screen --fg maintIncorrect. --fg is not the standard screen reattach option.
Incorrect. --fg is not the standard screen reattach option.
Try it yourself
An example you can run in a temporary verification environment.
screen --help 2>&1 | head || trueExpected result
screenがある場合はhelp。sessionは作らないKey points
- screen -r
- Detach
- Reattach
Notes
- Environment: GNU screen helpのみ
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.