============
Screen Usage
============

Basic Usage
===========

Create new session
------------------

.. code-block:: bash

   screen

Create a new named session
--------------------------

.. code-block:: bash

   screen -S SESSION

Attach to an existing session
-----------------------------

.. code-block:: bash

   screen -r

Attach to an existing named session
-----------------------------------

.. code-block:: bash

   screen -r SESSION

Forcefully attach an existing session, logs other user out
----------------------------------------------------------

.. code-block:: bash

   screen -Dr

Forcefully attach an existing named session, logs other user out
----------------------------------------------------------------

.. code-block:: bash

   screen -Dr SESSION

Attach to an existing session and share it with other users (if any)
--------------------------------------------------------------------

.. code-block:: bash

   screen -x

Attach to an enxisting named session and share it with other users (if any)
---------------------------------------------------------------------------

.. code-block:: bash

   screen -x SESSION

List active screen sessions for the current user
------------------------------------------------

.. code-block:: bash

   screen -list

Detach session
--------------

.. code-block:: bash

   ctrl+a + d

Create new tab
--------------

.. code-block:: bash

   ctrl+a + c

Kill current tab
----------------

.. code-block:: bash

   ctrl+a + k

Switch to tab
-------------

.. code-block:: bash

   ctrl+a + NUMBER

Enter Scrolling Mode
--------------------

.. code-block:: bash

   ctrl+a esc

Leave Scrolling Mode
--------------------

.. code-block:: bash

   enter
   enter


Enter a Screen command
----------------------

.. code-block:: bash

   ctrl+a + :
   COMMAND


Give a specific title to a tab
------------------------------

.. code-block:: bash

   ctrl+a :
   title
   TITLE


Continuesly log the content of the session
------------------------------------------

.. code-block:: bash

   ctrl+a + H