Have you ever experience the needs to multi-task in a single screen while the current SSH screen already occupied with the current task?
Ever experience a sudden internet outrage after spending almost 4 hours on cPanel installation via SSH? When you got your connection back, you’ll found out that you had to start the installation back from zero.
Worry no more. Apparently there is a great tool that can be installed in the server that can ease up your life. Presenting, Screen (yes, it is an obvious name). By using Screen, you can create multiple screens that suits your need in a single main screen. You are able to run it simultaneously at the same time and don’t have to worry if your internet sudden disconnect when you are connecting via SSH. You can continue your screens back when you are back online.
First of all, lets install the screen by typing:
yum install screen
You can start using screen by just typing:
screen
To list out all available screen:
screen -ls
Then it will looks like this:
root@server [/home/]# screen -ls
There are screens on:
23513.pts-1.server (Detached)
18174.pts-2.server (Detached)
To re-attach the screen:
screen -r screenname
To detach the screen:
screen -d
Then this message will appear:
[detached]
Alternatively, you can use keyboard shortcuts to manipulate the screen.
Use this if you want to create new screen:
CTRL + a + c
Use this if you want to view the next screen:
CTRL + a + n
Use this if you want to view previous screen:
CTRL + a + p
Use this if you want to detach the screen:
CTRL + a + d
Finally, to terminate the screen, just type:
exit
Then it will appear this:
[screen is terminating]
Have fun!