Using screen in linux

Screen is a very interesting utility that enables to persist a session when connecting from a terminal. To make a parallel, it’s the console version of vnc.

Start a new screen session:

screen -S <session_name>

Detach from the session but leave it running:

[Ctrl]-A D

End a session:

[Ctrl]-D

You can also start a session by starting a command line:

screen -dmS <session_name> <command_line>

In that case, the screen will be launched as a daemon and run in the background.

List all currently active sessions:

screen -ls

To attach to an existing session, use:

screen -x <session_name>

 

Advertisements

2 thoughts on “Using screen in linux

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s