50

How to go about closing a stalled screen tab (the machine is no longer reachable) ?

4 Answers 4

82

try to kill command.

  1. select stalled window ( C-a :select <stalled window number> )
  2. send kill command ( C-a :kill )
2
  • 2
    at least for my screen version, I get a message that :kill is ambiguous. :kill-window works, though. May 30, 2016 at 17:41
  • 15
    C-a, k also works
    – user35581
    Jun 16, 2016 at 17:24
8

The most simple and direct way, which has always worked for me, is

C-a, k
5

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.

2
  • 1
    Why 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.
    – Tyson
    Nov 2, 2015 at 20:40
  • 1
    Thanks I had a runaway shell command, screen would not respond to any Ctrl + A command, but this worked.
    – Bill Gale
    Dec 11, 2021 at 21:43
0

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...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .