linux ‘screen’ command reference

This is useful when working on multiple application or process on a Linux environment. Below are the common commands you’ll most likely needed.

Creating a new screen session

Type screen -S <session name> to start a new screen session. This will detached from your current screen to a new one.

You will now be able to execute your commands or operations needed. To save your session, you need to detached from it by pressing CONTROL + A, D.

Resuming, listing and quitting screen sessions

Once you have multiple named screen session, you can list it down by using the screen -ls command

To resume a session, the command is screen -S <screen name> -r, just make sure you will properly detached from it afterwards (again by pressing CONTROL + A, D).

To quit a detached screen session, use the command screen -S <screen name> -X quit. This will remove the screen session, below is an example of quitting one of the sessions i have created.