screen command on linux

To install screen on linux
For centos/RHEL base system
sudo yum install screen -y
For ubuntu base system
sudo apt-get install screen -y

screen command useful for wget,ryncs not lose session, when you detach it.

For example, create the screen with title
$ screen -t 'zimbra' ssh [email protected]

pressing "ctrl+a" n: next the screen (switch between screen)
pressing "ctrl+a" p: previous the screen (switch between screen)
pressing "ctrl+a" x : lock the screen
pressing "ctrl+a" k: kill the screen
pressing ctrl+a d : deattach

To list the screen
[huupv@huupv ~]$ screen -ls
There is a screen on:
    31083.pts-0.huupv    (Detached)
1 Socket in /var/run/screen/S-huupv.
To resume the screen
screen -r 31083
How to deattached screen with Attached status
[huupv@localhost]$ screen -ls
The output
There is a screen on: 20655.pts-4.ra3 (Attached)1 Socket in /var/run/screen/S-huupv.
[huupv@localhost]$ screen -r -d 20655.pts-4.ra3

"E437: terminal capability "cm" required"
Solve problem
export TERM=xterm
echo $TERM


Popular posts from this blog

zimbra some services are not running [Solve problem]

Bash script list all IP addresses connected to Server

How to install php7 on centos 6