How to use screen command

[Total: 3    Average: 5/5]

In this article we are going to share command for How to use screen command.

Screen is a full-screen window manager that multiplexes a physical terminal between several processes. Also If you disconnect the SSH session, or suddenly the connection lost by accident, then the download process will stop. You have to start from the beginning again. To avoid that, we can use screen and detach it.

login to your server through ssh and install screen using following command

[root ~ ]# yum install screen 

once the installation completed Just type screen at the command prompt. Then the screen will show with interface exactly as the command prompt.

[root ~ ]# screen

To exit from screen you can press “Ctrl-d”

============================

If you want to down big size data or migrate account data from one server to another server then you can use screen so If you disconnect the SSH session, or suddenly the connection lost by accident, then the download process will running back end.

step 1: type screen at the command prompt.

[root ~ ]# screen

fire your download command in the screen.

While downloading in progress, you can press “Ctrl-A and “d“”. You will not see anything when you press those buttons.

Re-attach the screen

After you detach the screen, let say you are disconnecting your SSH session and going home. In your home, you start to SSH again to your server and you want to see the progress of your download process. To do that, you need to restore the screen. You can run this command:

[root ~ ]# screen -r