How to use `screen` terminal multiplexer for Linux

Screen is a program which allows the user to run multiple preserved window session on a single machine. It’s commonly used for running long term procedures in the background by the detaching from the current running state without termination.

Here are several main useful commands.

List of running screens:

# screen -ls

Create new screen:

# screen -S 'task'

Shortcut keys for detach from the screen without termination:

Ctrl-a + d

Resume the screen:

// by screen name
# screen -r 'task'

// by PID
screen -r 12345

Terminate the screen:

# screen -X -S 13276.task kill

@source:

https://en.wikipedia.org/wiki/GNU_Screen
https://wiki.gentoo.org/wiki/Screen

Leave a Reply