Have you ever found yourself in a situation where you have to work off of one, just one terminal but felt that you are handicapped and you could be more productive with more than just one? Or have you found yourself kicked out of a terminal that you have some important command running but taking too much time which results to undesirable outcomes?
Well, let me introduce you to Screen, with the tools you can create multiple sessions in just one terminal.
I will share some basic commands that are commonly used to get you up to speed. A cheatsheet will be attached at the end at a later stage.
In order to start using you need to first install it.
1 apt install -y screen
1 yum install -y screen
Now you can start using more than 1 terminal in just one session.
Start a normal screen session
To list screens
1 screen -ls
To start a screen session with a screen name ‘screen1’
1 screen -S screen1
To attach to a screen with a screen name ‘screen1’
1 screen -r screen1
Once inside a screen session, to activate the screen commands/shortcuts you need to enter
Ctrl+a along with the following for various features
Ctrl+a cTo create a new screen
Ctrl+a nTo move to the next screen
Ctrl+a pTo move to previous screen
Ctrl+a "To see a list of all available screens (where
Ctrl+a EscTo scroll up the terminal in copy mode. Once in copy mode use up and down arrows to navigate and press