How to rename an existing screen session in Linux?

How to rename an existing screen session in Linux?

To create a named session use:

screen -S testsession

to list all session:

# screen -ls
There is a screen on:
        19415.something       (Detached)
1 Socket in /var/run/screen/S-root.

to rename an active session use -X sessionname

screen -S 19415.something -X sessionname newname

where:

19415.somethingold session name
newnamenew session name
rename an existing session in linux

Written by
Stefan Pejcic
Join the discussion

I enjoy constructive responses and professional comments to my posts, and invite anyone to comment or link to my site.