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
[[email protected] ~]$ 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
[[email protected]]$ screen -lsThe output
There is a screen on: 20655.pts-4.ra3 (Attached)1 Socket in /var/run/screen/S-huupv.
[[email protected]]$ screen -r -d 20655.pts-4.ra3
Error:
"E437: terminal capability "cm" required"
Solve problem
export TERM=xterm
echo $TERM
No comments:
Post a Comment