Is it possible to change the name of a GNU screen session? Say I called started it with "screen -S foo" and I want to rename it to bar.
C-a :sessionname mySessionName
$ screen -S foo [detached from 8890.foo] $ screen -ls There is a screen on: 8890.foo (22/12/11 18:39:22) (Detached) 1 Socket in /var/run/screen/S-user. $ screen -r Ctrl+A:sessionname bars [detached from 8890.bars] $ screen -ls There is a screen on: 8890.bars (22/12/11 18:39:21) (Detached) 1 Socket in /var/run/screen/S-user. $
Renaming without attaching
Alternatively, you can specifically target a screen session by its existing name or id (useful if there are already multiple sessions):
The easiest way is to rename it straight from inside the session.
If you have several sessions running, then: