Screen command usage tips in Linux

Source: Internet
Author: User
Tags bind command line copy end key reference split window
Linux's screen commands are good, and you'll find it much better than Windows ' taskbar. Here's My. SCREENRC, for reference only

Linux's screen commands are good, and you'll find it much better than Windows ' taskbar. Here is my. SCREENRC, for your reference only.
#
# ~/.SCREENRC
#

# do not show Welcome screen at startup
Startup_message off

# define screen's function key to Ctrl-z. You should press Ctrl-z Z when entering ctrl-z to the terminal.
Escape ^zz

# Screen buffer 1024 lines.
Defscrollback 1024

# Displays a list of Windows and clocks on the bottom line
Hardstatus on
Hardstatus Alwayslastline
Hardstatus string "%{.bw}%-w%{.ry}%n%t%{-}%+w%=%{... G}%H (%l)%{. Y}%y/%m/%d%c:%s "

# Turn off Error tips
Vbell off

# press Ctrl-z W or ctrl-z ctrl-w display window list
Bind W Windowlist-b
Bind ^w Windowlist-b


Common shortcut keys

Note: These shortcuts need to be used after the escape key is pressed. The default Escape key is Ctrl-a, posted above. SCREENRC changed it to Ctrl-z. For example, D, the actual operation should be pressed Ctrl-z D.

Shortcut key Features
D interrupts the current session and can be restored with the Screen-r command next time
C Open a new window
0-9 number between window 0-window 9 fast switch
N Next window
P Previous window
S split Screen
TAB to toggle between split screens
X Closes the split screen
[Enter copy mode, move cursor with HJKL, start point in empty cell, select end point by Space again, copy
] Paste
? Help
: The command line to enter screen


A few other common tips to mention:

Repeat the escape key to quickly switch between the current window and the previous window. For example, press ^z3 from window 1 to switch to Window 3, and then press ^Z^Z to switch between Windows 1 and 3.

Window Segmentation Usage: First press ^zs (s to capitalize) to split, and then use ^z<tab> switch to the split out of the new screen, and then use ^z< digital > in the new screen to switch windows. End segmentation can be done with ^ZX.

Page: After using screen, you can't use the usual shift-pageup and shift-pagedown to turn the page. You can press ^z[into the copy mode, you will be able to use the same shortcut to the VI page to view history. Finally press ESC to cancel replication mode.

About the Escape key selection:

The default ctrl-a has a 1 function conflict with VI. If you are unhappy with ctrl-a, then when you use vim without screen, you will inadvertently press CTRL-A to change the numbers nearby. So it's better to change to another key.

The commonly used screen shortcuts are in the left hand, so escape should be placed in three columns to the left of the keyboard. Ctrl-q and Ctrl-s by the terminal use cannot bind, CTRL ' screen does not support, ctrl-w with vim's switch Window command conflict, ctrl-d with Vim's paging conflict, ctrl-x and vim 1 function conflict, CTRL-E and Vim's scrolling conflict, Ctrl-c is a very common abort procedure. So we can only use the ctrl-z. Ctrl-z is used to pause a program, which is not commonly used and can be set to the escape key for screen. Press Ctrl-z Z When you need to pause the program



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.