Huu Phan | Blog Linux operating system | Linux operating system -Blog Huu Phan | www.huuphan.com
huuphan.com. Powered by Blogger.

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
[[email protected] ~]$ 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
[[email protected]]$ screen -ls
The 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

post new :

Huu Phan | Blog Linux operating system | Huu Phan ~ Zimbra Mail Server,linux,bash script,centos,linux command | www.huuphan.com