Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Linux screen Command

Linux screen Command

Linux Command Reference Linux Command Reference

The Linux screen command is used as a multi-window manager.

screen is a multi-window manager. A "window" here refers to a full-screen text-mode display. Usually, the screen program is only used when logging into a host via telnet or when using an old-fashioned terminal.

Syntax

screen [-AmRvx -ls -wipe][-d <作业名称>][-h <行数>][-r <作业名称>][-s ][-S <作业名称>]

Parameter Description:

Example

Create a screen terminal

# screen //创建 screen 终端

Create a screen terminal and execute a task

# screen vi ~/main.c //创建 screen 终端 ,并执行 vi命令

Leave the screen terminal

# screen vi ~/main.c //创建 screen 终端 ,并执行 vi命令



#include 



main ()

{



}



"~/mail.c"       0,0-1    



在 screen 终端 下 按下 Ctrl+a d键

Reconnect to a left screen terminal

# screen -ls  //显示已创建的screen终端 

There are screens on:

2433.pts-3.linux    (2013年10月20日 16时48分59秒)    (Detached)

2428.pts-3.linux    (2013年10月20日 16时48分05秒)    (Detached)

2284.pts-3.linux    (2013年10月20日 16时14分55秒)    (Detached)

2276.pts-3.linux    (2013年10月20日 16时13分18秒)    (Detached)

4 Sockets in /var/run/screen/S-root.



# screen -r 2276 //re-attach the screen terminal with screen_id 2276

Linux Command Reference Linux Command Reference