• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

Linux Screen

December 26, 2022

Just documenting the Linux Screen command.

Install screen first.

yum install screen
dnf install screen
apt install screen
zypper install screen

yum install screen dnf install screen apt install screen zypper install screen

Start a new screen.

screen -S one
screen -S two
screen -S three

screen -S one screen -S two screen -S three

Detach from screen.

Ctrl+a+d

Ctrl+a+d

List active screens.

screen -ls 
There is a screen on:
        15575.one   (Detached)
        15581.two   (Detached)
        15593.three (Detached)
1 Socket in /var/run/screen/S-root.

screen -ls There is a screen on: 15575.one (Detached) 15581.two (Detached) 15593.three (Detached) 1 Socket in /var/run/screen/S-root.

Reattach to an existing screen.

screen -r one
screen -r two
screen -r three

screen -r one screen -r two screen -r three

If there’s only one active screen, you can run screen -r without the name.

screen -r

screen -r

To exit or quit a screen, reattach and run exit.

screen -r three
# exit
[screen is terminating]

screen -r three # exit [screen is terminating]

Filed Under: Linux Tagged With: attach, detach, list, screen

Search This Website

Subscribe Via Email

  • Home
  • About
  • Archives

Copyright © 2023