Skip to content

Instantly share code, notes, and snippets.

@decima
Last active December 4, 2019 14:37
Show Gist options
  • Save decima/6394ccc33131c45d1c28afa5df895212 to your computer and use it in GitHub Desktop.
Save decima/6394ccc33131c45d1c28afa5df895212 to your computer and use it in GitHub Desktop.
How to use screen tutorial

Screen Tutorial

Outside of a screen

Launch a new screen session and enter in it

screen

See the list of screens

screen -ls

Launch a command inside a screen

screen -dmS test tail -f /var/log/syslog

Screen in detached mode -d, executing tail -f /var/log/syslog and the screen will be named test. On command finishes, the screen will be deleted

Detach screen from the outside

screen -d name_of_your_screen_or_id

Enter in exclusive way in the screen

screen -r name_or_id

Enter in sharing way in the screen

screen -x name_or_id

In case you have an error wich involves /dev/ptX, run

script /dev/null

Inside a screen

exit a Screen

exit

Detach your screen

ctrl+a then press d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment