- How to install screen
check if it is installed on your system
screen --version
If you don’t have screen, install it
sudo apt install screen
- Starting linux screen
screen
To create a named session:
screen -S session_name
- Linux screen windows
- Ctrl+a c Create a new window (with shell).
- Ctrl+a " List all windows.
- Ctrl+a 0 Switch to window 0 (by number).
- Ctrl+a A Rename the current window.
- Ctrl+a S Split current region horizontally into two regions.
- Ctrl+a | Split current region vertically into two regions.
- Ctrl+a tab Switch the input focus to the next region.
- Ctrl+a Ctrl+a Toggle between the current and previous windows
- Ctrl+a Q Close all regions but the current one.
- Ctrl+a X Close the current region.
- Detach from linux screen session
ctral + a d
- Reattach
screen -r
If you have multiple sessions:
1) To find session ID:
screen -ls
screen -r session_ID
If you want to kill a screen session:
1) To find session ID:
screen -ls
screen -r sesson_ID
exit
2) Make sure it's closed
screen -ls