ITPub博客

首页 > Linux操作系统 > Linux操作系统 > [20191217]Linux screen Command学习笔记.txt

[20191217]Linux screen Command学习笔记.txt

原创 Linux操作系统 作者:lfree 时间:2019-12-17 11:08:15 0 删除 编辑

[20191217]Linux screen Command学习笔记.txt

--//很少使用Screen命令,不过有时候有一些服务器没有安装tmux,需要这类的软件协同工作.自己并不想仔细学习.
--//仅仅了解基本使用就ok了.
--//基本操作键如下,实际上有点跟tmux相似.估计tmux开始也是借鉴screen的一些操作键.

Ctrl-a followed by c: create a new windows
Ctrl-a followed by w: display the list of all the windows currently opened
Ctrl-a followed by A: rename the current windows. The name will appear when you will list the list of windows opened with Ctrl-a followed by w.
Ctrl-a followed by n: go to the next windows
Ctrl-a followed by p: go to the previous windows
Ctrl-a followed by Ctrl-a: back to the last windows used.
Ctrl-a followed by a number from 0 to X: go the windows n° X.
Ctrl-a followed by ": choose the windows into which to move on. "
Ctrl-a followed by k: close the current windows (kill)
Ctrl-a followed by S: split the current windows horizontally. To switch between the windows, do Ctrl-a followed by Tab.
Ctrl-a followed by |: split the current windows vertically
Ctrl-a followed by d: detach a screen session without stopping it
Ctrl-a followed by r: reattach a detached screen session
Ctrl-a followed by [: start the copy mode
Ctrl-a followed by ]: paste the copied texte

1.启动screen:
--//sesson 1:
$ screen

--//session 2:
# screen -ls
There is a screen on:
        8848.pts-0.hisdg        (Attached)
1 Socket in /tmp/screens/S-root.

--//session 2:
$ screen -d 8848

--//sesson 1会提示:
[remote detached]
--//这时连接detached.

# screen -ls
There is a screen on:
        8848.pts-0.hisdg        (Detached)
1 Socket in /tmp/screens/S-root.

--//使用如下命令连接attach上.
$ screen -r 8848

--//如果仅仅1个screen,可以screen -d退出,screen -r连上.
--//还有一种方式给screen 一个名字:screen -S test

# screen -S test
# screen -ls
There is a screen on:
        9190.test       (Attached)
1 Socket in /tmp/screens/S-root.

2.如何共享会话:
# screen -x test

--//知道这些就足够了.

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/267265/viewspace-2668952/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
熟悉oracle相关技术,擅长sql优化,rman备份与恢复,熟悉linux shell编程。

注册时间:2008-01-03

  • 博文量
    4006
  • 访问量
    7969289