[SOLVED] Linux screen command keyboard shortcuts

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
flyingrhino
Level 4
Level 4
Posts: 252
Joined: Sat Apr 04, 2015 8:55 pm

[SOLVED] Linux screen command keyboard shortcuts

Post by flyingrhino »

Not an attempt to recreate the man page, but simply to put all the navigation keyboard shortcuts into one place, organized by subject (I tried to categorize them into some sensible groups)

Code: Select all

-d | -D			Detach a session. Used with -r | -R it allows to reattach too
				Check if this is useful where I need to specify a session

-ls | -list		List screen sessions

-r				Resume a detached screen
				If only one screen then normally it will connect with no additional arguments
				If more than one screen (or for other reasons), you need to define the screen session:
					Use 'screen -ls' , then 'screen -r 1234' where 1234 is the session number.
					If this doesn't work then use 'screen -r user/OUTPUT'
					Where OUTPUT is the pid.tty.host from the 'screen -ls' command

-d -r			Reattach a session and if necessary detach it first. Useful if -r alone refuses to connect

-R				Resume the youngest screen without other options


Usage
-----

CTRL-a <key>	Issue commands. Lowercase commands can also be CTRL-A CTRL-COMMAND

CTRL-a "		List all windows to select one to switch to
CTRL-a '		Prompt for a window number (1..n) or name to switch to
CTRL-a w		Show a list of windows
CTRL-a 0..9		Switch immediately to window n (n is 0 to 9)
CTRL-a -		Switch to a blank window (not sure why this is useful)
CTRL-a CTRL-a	Switch to the previously displayed window
CTRL-a SPACE	Switch to next window
CTRL-a n		Same
CTRL-a BACKSP	Switch to previous window (backspace)
CTRL-a p		Same
CTRL-a c		Create a new window
CTRL-a A		Rename the current window
CTRL-a k		Kill this current window
CTRL-a CTRL-\	Kill all windows and terminate screen

CTRL-a d		Detach from screen
CTRL-a D		Detach from screen and logout
CTRL-a x		Lock this terminal (locks screen and all screen windows)
CTRL-a z		Suspend screen (job control)

CTRL-a C		Clear the screen
CTRL-a l		Fully refresh current window
CTRL-a r		Toggle the current window line wrap setting
CTRL-a CTRL-g	Toggle visual bell mode
CTRL-a W		Width - toggle 80/132 chars
CTRL-a Z		Reset the terminal to its power on settings

CTRL-a m		Repeat the last message displayed in the message line
CTRL-a M		Toggles monitoring of the current window (alerts when changes occur)
CTRL-a _		Start/stop monitoring current window for inactivity

CTRL-a a		Send the command CTRL-a to the terminal
CTRL-a q		Send CTRL-q (xon) to the current window
CTRL-a s		Send CTRL-s (xoff) to the current window. Freezes the window - CTRL-a q releases it
CTRL-a f		Turn flow on/off. Not sure what this does
CTRL-a b		Send break to the window. Not sure about it because it appears to do nothing - and CTRL-c does work
CTRL-a B		Reopen the terminal line and send a break. Not sure about this one
CTRL-a :		Enter commands controlling screen (such as 'activity MESSAGE') 
CTRL-a CTRL-v	Enter a diagraph
CTRL-a L		Toggle this window's login slot (utmp database)

CTRL-a ?		Show help menu
CTRL-a t		Show system information
CTRL-a i		Show info about this window
CTRL-a N		Show the number (and title) of the current window
CTRL-a ,		Show text about screen program (not useful)
CTRL-a v		Show screen program version information (not useful)
CTRL-a *		Show a listing of all attached displays (not useful)

CTRL-a ESC		Enter copy/scrollback mode
CTRL-a [		Same
CTRL-a ]		Paste. Write the paste buffer to current window
CTRL-a >		Write paste buffer to file
CTRL-a <		Read file into paste buffer
CTRL-a =		Remove the above file used by < >
CTRL-a { }		History. Copy/paste a previous line. Not sure on this one
CTRL-a .		Write a termcap file
CTRL-a h		Screenshot the current screen
CTRL-a H		Begin/end screen logging of the current window

CTRL-a S		Split horizontally (see two screens one above the other)
CTRL-a |		Split vertically (side by side)
CTRL-a TAB		Switch input focus to the next region (split etc)
CTRL-a Q		Delete all regions but the current one
CTRL-a X		Kill the current region
CTRL-a F		Resize the window to the current region size. Not sure what this does because window resize doesn't change it

Post Reply

Return to “Tutorials”