2014-02-27 20:51:40 +00:00
|
|
|
# screen
|
|
|
|
|
|
|
|
> Hold a session open on a remote server. Manage multiple windows with a single SSH connection.
|
2021-10-09 14:38:45 +01:00
|
|
|
> See also `tmux` and `zellij`.
|
|
|
|
> More information: <https://manned.org/screen>.
|
2014-02-27 20:51:40 +00:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Start a new screen session:
|
2014-02-27 20:51:40 +00:00
|
|
|
|
|
|
|
`screen`
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Start a new named screen session:
|
2015-06-26 03:12:09 +01:00
|
|
|
|
2016-05-17 10:56:39 +01:00
|
|
|
`screen -S {{session_name}}`
|
2015-06-26 03:12:09 +01:00
|
|
|
|
2021-01-31 17:05:18 +00:00
|
|
|
- Start a new daemon and log the output to `screenlog.x`:
|
2016-06-21 00:06:49 +01:00
|
|
|
|
|
|
|
`screen -dmLS {{session_name}} {{command}}`
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Show open screen sessions:
|
2014-02-27 20:51:40 +00:00
|
|
|
|
|
|
|
`screen -ls`
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Reattach to an open screen:
|
2014-02-27 20:51:40 +00:00
|
|
|
|
2016-05-17 10:56:39 +01:00
|
|
|
`screen -r {{session_name}}`
|
2014-02-27 20:51:40 +00:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Detach from inside a screen:
|
2014-02-27 20:51:40 +00:00
|
|
|
|
2023-12-29 16:02:08 +00:00
|
|
|
`<Ctrl> + A, D`
|
2015-12-29 03:20:38 +00:00
|
|
|
|
2019-06-14 18:02:28 +01:00
|
|
|
- Kill the current screen session:
|
|
|
|
|
2023-12-29 16:02:08 +00:00
|
|
|
`<Ctrl> + A, K`
|
2019-06-14 18:02:28 +01:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Kill a detached screen:
|
2015-12-29 03:20:38 +00:00
|
|
|
|
2016-05-17 10:56:39 +01:00
|
|
|
`screen -X -S {{session_name}} quit`
|