How to go about closing a stalled screen tab (the machine is no longer reachable) ?
4 Answers
try to kill
command.
- select stalled window (
C-a
:select <stalled window number>
) - send kill command (
C-a
:kill
)
-
2at least for my screen version, I get a message that :kill is ambiguous. :kill-window works, though. Commented May 30, 2016 at 17:41
-
16
Assuming you are using the OpenSSH client to connect, you can type Enter
~
.
to close the connection.
To list the other SSH client escape commands, type Enter
~
?
when connected.
-
1Why the down vote? This addresses the "machine is no longer reachable" aspect of the question directly. Sure you can do other things to close a remote connection (eg: shut down your computer), but that doesn't directly address the stalled remote connection.– TysonCommented Nov 2, 2015 at 20:40
-
1Thanks I had a runaway shell command, screen would not respond to any Ctrl + A command, but this worked. Commented Dec 11, 2021 at 21:43
When you have an unresponsive tab, oftentimes you cannot navigate into the tab itself; to kill a stalled tab/window from another tab:
C-a: at "<tabNum>#" kill
, i.e. to kill tab 7, C-a: at "7#" kill
To kill an individual tab in a detached GNU Screen session:
screen -XS <sessID> -p <tabNum> kill
Hope someone finds this useful...