Screen (or, gnu-screen
) is a terminal emulator which will allow you to have multiple 'virtual terminals' within one actual terminal.
A great benefit of screen
is that these virtual terminals can run in the background, even after closing the real terminal, they can be picked back up later, even from another machine!
sudo apt-get install screen -y
screen
launches screen and opens a new window, be sure to use screen -r
if you want to reattach to existing windows.
CTRL+a d
detaches from a window.
CTRL+a, c
is to create a new window.
CTRL+a, a
swaps terminals, this is also a great way to check if you're in screen or not to begin with .
CTRL+a, "
lists windows, with their names.
CTRL+a, A
to nAme a window.
exit
will leave a window, and if you leave the last one you will exit screen.
CTRL+a, ?
lists all the commands.
CTRL+a, ESC
to enter copy
mode, allowing you to scroll.
~/.screenrc
# Prevent welcome dialogue
startup_message off
# Prevent screen from flashing (virtual bell)
vbell off