For centos/RHEL base system
sudo yum install screen -yFor 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 -lsTo resume the screen
There is a screen on:
31083.pts-0.huupv (Detached)
1 Socket in /var/run/screen/S-huupv.
screen -r 31083How to deattached screen with Attached status
[huupv@localhost]$ screen -lsThe 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
Error:
"E437: terminal capability "cm" required"
Solve problem
export TERM=xterm
echo $TERM
Thanks for reading screen command on linux My blog Effortless Zimbra Mail Management: Unleashing the Power of Linux Commands, How-To, and Bash Scripts I hope this is useful.