Command Options
Command |
Description |
screen |
Start a new session |
screen -S <name> |
Start a new session with a session name |
screen -ls |
List running sessions |
screen -r [name] |
Reattach to a running session |
screen -X |
Send a command to a running session |
screen -X -S <name> |
Send a command to a specified session |
screen -X -S <name> kill |
Kill a running session |
Command Key in Sessions
By default, Ctrl-a is a special key to send a command to a screen’s session.
I call <Leader>
like Vim in this document.
Commands
Command |
Description |
<Leader> d |
Detach the current session |
<Leader> S |
Split a display horizontally |
<Leader> | |
Split a display vertically |
<Leader> c |
Create a new window |
<Leader> tab |
Move to a next window |
<Leader> X |
Remove the current window |
<Leader> Q |
Remove all windows without the current one |
<Leader> k |
Kill the current session |