How do I use screen on the Linux systems?
Scope
The screen utility provides a way to run a command on a Linux system, detach from it, and then reattach later. This is particularly handy if you have a long-running process that you want to keep running even after you log out and still have the ability to reattach to it later and/or from another location.
This is general information about using screen that applies to just about every Linux system, not just those in the School of Informatics and Computing.
Basic Screen Usage
There are many good tutorials available on the web describing the use of screen. There is also detailed information in the screen man page, which you can view by running man screen. However, much of this information can be rather daunting given the sheer number of command line arguments and key bindings. The purpose of this page if to give you the bare minimum of information needed to get started with screen.
Here are the steps you can follow to run a process in screen, detach from the terminal, and then reattach.
- From the command prompt, just run screen. This will give you a new subshell.
- Run your desired program
- Detatch from the screen session using the key sequence Ctrl-a Ctrl-d (note that all screen key bindings start with Ctrl-a). This will drop you back to your original shell and display a message "[detached]", indicating that the screen session is still running.
- You can then list the available screen sessions by running "screen -list"
- You can reattach to this screen session by running "screen -r". Once reattached, you will be able to take off where you left off and see any output that was printed to the screen during the time that you were detached. If you have multiple screen sessions, then you can specify the tty name (as displayed by screen -list) as an argument to screen -r to attach to a particular session
- on OSX entering
screen -X quiton any terminal terminates all active sessions - on linux
List screens:
screen -list
Output:
There is a screen on:
23536.pts-0.wdzee (10/04/2012 08:40:45 AM) (Detached)
1 Socket in /var/run/screen/S-root.
Kill screen session:
screen -S 23536 -X quit ('exit' also work?)
Kerberos Issues
If you are using screen on the available SoIC Unified Linux Systems that are using the Unified Workstation Configuration you will need to take special care when using screen to keep your kerberos credentials alive. For example, this is necessary if you are running screen on a workstation in LH035 but not if you are using a server like silo, tank, or hulk.
Please see the Running Persistent Remote Processes section of the KB article Understanding Linux Kerberos Issues for details on how you can keep your kerberos credentials alive in your screen session. Failure to follow the procedure detailed in that KB page will result in your screen session losing access to your networked home directory. When this happens, it can result in excessive load being put on the home directory file server and it may be necessary for systems staff to kill your screen session.
How do I use screen on the Linux systems?的更多相关文章
- Screen会话命令 Linux
由于经常在服务器上运行程序,本地不可能一直和服务器保持连接,而且如果本地和服务器的连接断开,在服务器上运行的程序将会终止,为了,查找了一些网络资料,发现screen 会话命令可以保持本地和服务器断开后 ...
- screen command of linux
[screen command of linux] 常用键: 补充: Ctrl-a S # split terminal horizon Ctrl-a TAB # switch to ano ...
- Virtualization solutions on Linux systems - KVM and VirtualBox
Introduction Virtualization packages are means for users to run various operating systems without &q ...
- Screen命令让Linux shell在后台运行
#screen ping ychack.com //挂置后台ping本站 #screen ping baidu.com //挂置后台ping百度 #screen -ls //列出进程 #screen ...
- Install MongoDB on Linux Systems 速记
下载mongodb最新版本: 下载链接:http://pan.baidu.com/s/1kTDnkyz curl -O http://downloads.mongodb.org/linux/mongo ...
- 交叉编译工具链介绍《Building Embedded Linux Systems》
1.前言 配置和编译一个合适的GNU工具链是相对复杂的并且需要很精细的操作,包括你需要对不同软件库之间的依赖关系.它们的各自的任务,不同软件库版本情况都有比较好的了解,编译工具链是一个乏味的工作. 2 ...
- pkgmgmt: Comparison between different Linux Systems..
found this page.. already done by precedents.. installation: aptitude install apt-get install yum in ...
- linux screen 命令详解
一.背景 系统管理员经常需要SSH 或者telent 远程登录到Linux 服务器,经常运行一些需要很长时间才能完成的任务,比如系统备份.ftp 传输等等.通常情况下我们都是为每一个这样的任务开一个远 ...
- linux screen 命令详解[转]
一.背景 系统管理员经常需要SSH 或者telent 远程登录到Linux 服务器,经常运行一些需要很长时间才能完成的任务,比如系统备份.ftp 传输等等.通常情况下我们都是为每一个这样的任务开一个远 ...
随机推荐
- java IO类简单介绍
一.流的概念 流是字节序列的抽象概念.流和文件的差别:文件是数据的静态存储形式,而流是指数据传输时的形态.文件只是流的操作对象之一.流按其操作的对象不同可以分为文件流.网络流.内存流.磁带流等.Jav ...
- 白话浅说TCP/UDP面向连接,面向无连接的区别
TCP是面向连接的UDP是面向无连接的就是这种关系了 TCP(Transmission Control Protocol,传输控制协议) UDP(User Datagram Protocol,用户数据 ...
- static在C和C++里各代表什么含义
转自:http://blog.csdn.net/wanglongfei_hust/article/details/10011503 static关键字有三种使用方式,其中前两种只指在C语言中使用,第三 ...
- 深入理解java虚拟机(十四)正确利用 JVM 的方法内联
在IntelliJ IDEA里面Ctrl+Alt+M用来拆分方法.选中一段代码,敲下这个组合,非常简单.Eclipse也用类似的快捷键,使用 Alt+Shift+M.我讨厌长的方法,提起这个下面这个方 ...
- hadoop2.2.0编译、安装和测试
搭建环境:单机64位CentOS6.5 .jdk1.6.0_45.Hadoop2.2.0 1.准备编译环境 从http://www.apache.org/dyn/closer.cgi/hadoop/c ...
- ASP.NET Core2.0杂项
一.添加自定义的路由. 1.1.默认的路由添加语句 Startup文件的ConfigureServices方法中添加: services.AddMvc();//添加MVC的服务 1.2 添加自定义的路 ...
- .net core 高性能对象映射
关于对象转换已经有不少轮子(AutoMapper,TinyMapper) .出于项目需要,手动造一个简单轮子.先贴代码 1.采用静态泛型类缓存,避免了拆箱装箱操作. 2.对于转换对象中有,字段名一样但 ...
- BT Tracker的原理及.Net Core简单实现Tracker Server
最近很忙,自上次Blog被盗 帖子全部丢失后也很少时间更新Blog了,闲暇在国外站点查阅资料时正好看到一些Tracker 的协议资料,也就今天记录并实践了下,再次分享给大家希望可以帮到需要的小伙伴. ...
- 洛谷P3613 睡觉困难综合征
传送门 题解 人生第一道由乃…… 做这题之前应该先去把这一题给切掉->这里 我的题解->这里 然后先膜一波zsy大佬和flashhu大佬 大体思路就是先吧全0和全1的都跑答案,然后按位贪心 ...
- Angular2 内置指令 NgFor 和 NgIf 详解
http://www.jb51.net/article/89781.htm 在这一章节中,我们来学习如何使用Angular2来展示数据,以及如何使用它的内置指令NgFor和NgIf 首先要确保你有一个 ...