About Screen commands

Source: Internet
Author: User

First, screen commonly used functions

(1) Session recovery-most commonly used-to resume a session after disconnecting using the OPS tool network

(2) session sharing-I'm doing the operation, and others can see it.

(3) Multi-window


Second, what is the use of screen?

If we were running a program, we might have to run for a couple of hours, but we were off the grid.

You can't see the running state of the program on the connection, so you can create a session with screen.

Third, Screen Basic command

[[email protected] ~]# SCREEN-LS lists which programs are running screen

[[email protected] ~]# screen-s Apache Start screen, give it a name

[[email protected] ~]# screen-x apache-x parameter can go to a disconnected session

Iv. Installation of screen

(1) [Email protected] ~]# Rpm-qa | grep screen Query This machine installs screen

Screen-4.0.3-18.el6.x86_64

(2) [[email protected] ~]# yum-y Install screen installation screen


(3) Create a session:

[Email protected] ~]# screen-s Apache


(4) To view the created session:

[Email protected] ~]# Screen-ls

There is a screens on:

5410.apache(attached)

1 Socket in/var/run/screen/s-root.

[Email protected] ~]#

(5) test to perform a ping task and then disconnect

[[email protected] ~]# Ping baidu.com

PING baidu.com (123.125.114.144) bytes of data.

Bytes from 123.125.114.144:icmp_seq=1 ttl=51 time=50.3 ms

Bytes from 123.125.114.144:icmp_seq=2 ttl=51 time=50.1 ms

Bytes from 123.125.114.144:icmp_seq=3 ttl=51 time=50.1 ms

Bytes from 123.125.114.144:icmp_seq=4 ttl=51 time=50.1 ms

Bytes from 123.125.114.144:icmp_seq=5 ttl=51 time=50.2 ms

Bytes from 123.125.114.144:icmp_seq=6 ttl=51 time=50.2 ms


(6) Resuming a session

[[email protected] ~]# Screen-ls View session, name is Apache

There is a screens on:

5410.apache(Detached)

1 Socket in/var/run/screen/s-root.


[[email protected] ~]# Screen-r Apache resume session with-R parameter

Bytes from 123.125.114.144:icmp_seq=77 ttl=51 time=50.1 ms

Bytes from 123.125.114.144:icmp_seq=78 ttl=51 time=50.4 ms

Bytes from 123.125.114.144:icmp_seq=79 ttl=51 time=50.4 ms

Bytes from 123.125.114.144:icmp_seq=80 ttl=51 time=51.3 ms

Bytes from 123.125.114.144:icmp_seq=81 ttl=51 time=53.4 ms

Bytes from 123.125.114.144:icmp_seq=82 ttl=51 time=49.7 ms

Bytes from 123.125.114.144:icmp_seq=84 ttl=51 time=50.2 ms

Bytes from 123.125.114.144:icmp_seq=85 ttl=51 time=50.2 ms

Bytes from 123.125.114.144:icmp_seq=86 ttl=51 time=50.2 ms

Bytes from 123.125.114.144:icmp_seq=87 ttl=51 time=51.6 ms

Bytes from 123.125.114.144:icmp_seq=88 ttl=51 time=52.2 ms


(7) [[email protected] ~]# screen-x apache-x parameter can go to a disconnected session


This article is from the "Bobcat" blog, make sure to keep this source http://cqtangbo.blog.51cto.com/2978612/1752673

About Screen commands

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.