screen
2015-06-02 22:34
295 查看
Please ref to this page: http://www.ibm.com/developerworks/cn/linux/l-cn-screen/ https://www.linux.com/learn/tutorials/442418-using-screen-for-remote-interaction
screen basic usage:
1. screen can exit if even you log out or ssh session terminated. That feature is very usefull
when you login a server to build a project or copy large files, which can take hours to be
finished. you can create a screen session and then execute your task and detach from
your current session, then you logout your computer and go home.When you get home,
you can log in your computer and check if there is a error happended. What is you to do
is just reattach the screen session.
1. create a screen session
screen vi test/init
2. check screen sessions
bash-4.3> screen -ls
There is a screen on:
3460.pts-0.alloc-Rev-1-0 (2015年06月02日 22时03分23秒) (Detached)
1 Socket in /var/run/screen/S-alloc.
3. detach from current session
C-a d
4. reattach the session
bash-4.3> screen -r 3460
5. create new window
C-a c or screen cmd
6. switch windows
C-a +windnum
7 exit screen
C-a \
8. quit a session
screen -X -S session quit
9. kill a window
C-a k
10 rename a window
C-a A
11: send C-a to app(eg send C-a to emacs)
C-a a
12 enable altscreen
add altscreen on
with altscreen on, vim/emacs exit, screen will return the old state.
13 send command to nested screen
C-a a + command
14. screen config file
startup_message off # default: on
defscrollback 4096 # default: 100
shell -$SHELL
vbell off
crlf off # default: off
caption always "%{= kw} %H | %{kc}%?%-w%?%{kY}%n*%f %t%?(%u)%?%{= kc}%?%+w%? %=|%{kW} %l %{kw}| %{kc}%{-b}%D, %m/%d/%Y |%{kW}%{+b}%c:%s %{wk}"
termcapinfo xterm* 'hs:ts=\E]0;:fs=\007:ds=\E]0;\007'
defhstatus "screen ^E (^Et) | $USER@^EH"
hardstatus off
15 scroll up and down
C-a + [ + C-u(up) or C-d(down)
screen basic usage:
1. screen can exit if even you log out or ssh session terminated. That feature is very usefull
when you login a server to build a project or copy large files, which can take hours to be
finished. you can create a screen session and then execute your task and detach from
your current session, then you logout your computer and go home.When you get home,
you can log in your computer and check if there is a error happended. What is you to do
is just reattach the screen session.
1. create a screen session
screen vi test/init
2. check screen sessions
bash-4.3> screen -ls
There is a screen on:
3460.pts-0.alloc-Rev-1-0 (2015年06月02日 22时03分23秒) (Detached)
1 Socket in /var/run/screen/S-alloc.
3. detach from current session
C-a d
4. reattach the session
bash-4.3> screen -r 3460
5. create new window
C-a c or screen cmd
6. switch windows
C-a +windnum
7 exit screen
C-a \
8. quit a session
screen -X -S session quit
9. kill a window
C-a k
10 rename a window
C-a A
11: send C-a to app(eg send C-a to emacs)
C-a a
12 enable altscreen
add altscreen on
with altscreen on, vim/emacs exit, screen will return the old state.
13 send command to nested screen
C-a a + command
14. screen config file
startup_message off # default: on
defscrollback 4096 # default: 100
shell -$SHELL
vbell off
crlf off # default: off
caption always "%{= kw} %H | %{kc}%?%-w%?%{kY}%n*%f %t%?(%u)%?%{= kc}%?%+w%? %=|%{kW} %l %{kw}| %{kc}%{-b}%D, %m/%d/%Y |%{kW}%{+b}%c:%s %{wk}"
termcapinfo xterm* 'hs:ts=\E]0;:fs=\007:ds=\E]0;\007'
defhstatus "screen ^E (^Et) | $USER@^EH"
hardstatus off
15 scroll up and down
C-a + [ + C-u(up) or C-d(down)
相关文章推荐
- linux中的grep命令用法
- hdu 3117(矩阵快速幂)
- android内存泄露检测工具--LeakCanary 中文使用说明
- Junit使用过程中需要注意的诡异bug以及处理办法
- 好友服务器的实现
- 在 slua 中使用更新的面向对象方案
- linux中的grep命令用法
- 题目1369:字符串的排列
- Qt Gui程序显示文本用QPlainTextEdit
- gtk+学习笔记(六)
- Linux系统平均负载3个数字的含义
- 《哈佛通识教育红皮书》 哈佛委员会著
- ubuntu 的NFS配置
- 6.2音频读取的调试
- 《奇妙的NULL值,你知道多少?》
- 删除链表倒数第N个元素
- PHP基础示例:用正则表达式修改配置信息
- [BI项目记]-DB脚本同步
- MYSQL基础01 - 表的操作
- Struts文件上传allowedTypes问题,烦人的“允许上传的文件类型”