ubuntu Screen 的比较详细的命令

Linux Screen Commands For Developers

转自:http://fosshelp.blogspot.com/2014/02/linux-screen-commands-for-developers.html

大神的blog

 
1)
List all screen sessions of current user
#screen -ls

2)
To see all screen sessions on a specific machine
#ls -laR /var/run/screen/

3)
To see all commands or parameters on screen.
Ctrl + a, Then Press ?

4)
Open a new screen session
#screen

src="http://www.youtube.com/embed/y-cZpAlhpNU" frameborder="0" width="560" height="315">

5)
Detach/Exit from a screen session
Ctrl + a, Then Press d

6)
Kill a screen session
Ctrl + a, Then Press Shift + k 

7)
Reattach to a screen session
#screen -r session_id_or_name

8)
How to create multiple screen window/tab in a screen session
Ctrl + a, Then Press c

9)
How to move to next screen window/tab in a screen session
Ctrl + a, Then Press n

10)
How to move to previous screen window/tab in a screen session
Ctrl + a, Then Press p

11)
How to goto n'th screen window/tab
Ctrl + a, Then Press '

12)
How to list name of all screen windows/tabs and select from there
Ctrl + a, Then Press Shift + '

13)
How to switch to screen window/tab 0 - 9
Ctrl + a, Then Press 0 -9

14)
How to Toggle  to  the  window/tab  displayed  previously
Ctrl + a, Then Ctrl + a again

15)
How to change the name of screen window/tab
Ctrl + a, Then Press Shift + a

16)
How to clear a screen window/tab
Ctrl + a, Then Press Shift + c 

17)
How to Kill all windows and terminate screen
Ctrl + a, Then Press \
screen -ls

18)
How to lock a screen session
Ctrl + a, Then Press x

19)
How to log a screen session
You will find screenlog.0 file in your home directory.
Ctrl + a, Then Press Shift + h
or 
#screen -L (Capital L)

20)
reattach to a specific window/tab in a screen session
#screen -r session_id_or_name -p tab_num_or_name 

21)
If a session is running, then reattach. If necessary detach and logout remotely first. If it was not running create it and notify the user.
#screen -D -R

22)
How to create new screen session and specify a meaningful name for the session.
#screen -S session_name

23)
Howto Attach to a not detached screen session.
#screen -x

24)
How to split screen
a)
Split the Window
Horizontally 
Ctrl + a, Then Press Shift + s
or
Vertically 
Ctrl + a, Then Press Shift + \ 

b)
Switch between spilted windows
Ctrl + a, Then Press Tab
or
Ctrl + a, Then Type :focus
* Here :focus is a command 

c)
In the spited window use following command to open existing session 
Ctrl + a, Then Press 0-9
or
Ctrl + a, Then Press n or p
or
Ctrl + a, Then Press Shift + '
or
Ctrl + a, Then Presss c 

d)
Resize a splitted window/region
Ctrl + a, Then Type :resize 25
* Here :resize is a command

e)
Remove current splitted window/region
Ctrl + a, Then Type :remove
* Here :remove is a command
or
Ctrl + a, Then Press Shift + x

f)
Remove all spiltted windows/regions except the current one.
Ctrl + a, Then Type :only
* Here :only is a command
or
Ctrl + a, Then Press Shift +q

g)
Change color of split bar (border)
http://michael-prokop.at/computer/config/.screenrc 
#vim ~/.screenrc
sorendition 10 74 

h)
Close the screen and all regions
Ctrl + a, Then Press \

25) 
How to rename an existing session
screen -ls
screen -x old_session_name
Ctrl + a, Then Type :sessionname new_session_name
*Here :sessionname is a command
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

mingjie1212

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值