Sunday 4 November 2018

How to Use Screen command in Centos/RHEL

Screen utility allows running multi-tasking environment and keeping processes running in the background. By default, package is not available in CentOS distribution. Follow the below article to installed.
Screen package installation: follow the tutorial How to install Screen utility in CentOS 7 to install screen package in Centos / RHEL.

Basic use of Screen command

Starting screen session: Run the following command to start screen session.

[root@linuxcnf ~]# screen

Now entered in a screened window and can do all work without losing control if any session disconnection.

Detaching screen session: While running any progress and middle of the process, we can detach from the screen by pressing “Ctrl-A” and “d“. Command: “Ctrl-a” “d” will Detach the session.

List of running screen session: The “-list” option will display all the running screen sessions:

[root@linuxcnf ~]# screen -list

Reattach screen: Run the following command to re-attach the screen session by specifying session ID.

[root@linuxcnf ~]# screen –r <Session ID>

Now the screen session is open.

No comments:

Post a Comment