5. Commands
A command in screen can either be bound to a key, invoked from a
screenrc file, or called from the colon prompt
(see section 4. Customizing Screen). As of version 3.3, all commands can be bound
to keys, although some may be less useful than others.
For a number of real life working examples of the most important
commands see the files `etc/screenrc' and `etc/etcscreenrc'
of your screen distribution.
In this manual, a command definition looks like this:
- -- Command: command [-n] ARG1 [ARG2] ...
- (keybindings)
This command does something, but I can't remember what.
An argument in square brackets (`[]') is optional. Many commands
take an argument of `on' or `off', which is indicated as
state in the definition.
5.1 Default Key Bindings
As mentioned previously, each keyboard command consists of a
C-a followed by one other character. For your convenience, all
commands that are bound to lower-case letters are also bound to their
control character counterparts (with the exception of C-a a; see
below). Thus, both C-a c and C-a C-c can be used to create
a window.
The following table shows the default key bindings:
- C-a '
- (select)
Prompt for a window identifier and switch.
See section 7. Selecting a Window.
- C-a "
- (windowlist -b)
Present a list of all windows for selection.
See section 7. Selecting a Window.
- C-a 0...9, -
- (select 0...select 9, select -)
Switch to window number 0...9, or the blank window.
See section 7. Selecting a Window.
- C-a Tab
- (focus)
Switch the input focus to the next region. See section 9. Regions.
- C-a C-a
- (other)
Toggle to the window displayed previously. If this window does no
longer exist, other has the same effect as next.
See section 7. Selecting a Window.
- C-a a
- (meta)
Send the command character (C-a) to window. See escape command.
See section 14.3 Command Character.
- C-a A
- (title)
Allow the user to enter a title for the current window.
See section 10.1 Naming Windows (Titles).
- C-a b
- C-a C-b
- (break)
Send a break to the tty.
See section 20.2 Break.
- C-a B
- (pow_break)
Close and reopen the tty-line.
See section 20.2 Break.
- C-a c
- C-a C-c
- (screen)
Create a new window with a shell and switch to that window.
See section 6.2 Screen Command.
- C-a C
- (clear)
Clear the screen. See section 11.5 Clear.
- C-a d
- C-a C-d
- (detach)
Detach screen from this terminal. See section 8.1 Detach.
- C-a D D
- (pow_detach)
Detach and logout. See section 8.2 Power Detach.
- C-a f
- C-a C-f
- (flow)
Cycle flow among `on', `off' or `auto'. See section 15.2 Flow.
- C-a F
- (fit)
Resize the window to the current region size. See section 11.10 Window Size.
- C-a C-g
- (vbell)
Toggle visual bell mode. See section 11.4 Bell.
- C-a h
- (hardcopy)
Write a hardcopy of the current window to the file "hardcopy.n".
See section 18.1 hardcopy.
- C-a H
- (log)
Toggle logging of the current window to the file "screenlog.n".
See section 18.2 log.
- C-a i
- C-a C-i
- (info)
Show info about the current window. See section 11.6 Info.
- C-a k
- C-a C-k
- (kill)
Destroy the current window. See section 10.3 Kill.
- C-a l
- C-a C-l
- (redisplay)
Fully refresh the current window. See section 11.7 Redisplay.
- C-a L
- (login)
Toggle the current window's login state. See section 10.4 Login.
- C-a m
- C-a C-m
- (lastmsg)
Repeat the last message displayed in the message line.
See section 17.3 Display Last Message.
- C-a M
- (monitor)
Toggle monitoring of the current window. See section 10.6 Monitoring.
- C-a SPC
- C-a n
- C-a C-n
- (next)
Switch to the next window. See section 7. Selecting a Window.
- C-a N
- (number)
Show the number (and title) of the current window. See section 20.7 Number.
- C-a p
- C-a C-p
- C-a C-h
- C-a BackSpace
- (prev)
Switch to the previous window (opposite of C-a n).
See section 7. Selecting a Window.
- C-a q
- C-a C-q
- (xon)
Send a ^Q (ASCII XON) to the current window. See section 15.3 XON and XOFF.
- C-a Q
- (only)
Delete all regions but the current one. See section 9. Regions.
- C-a r
- C-a C-r
- (wrap)
Toggle the current window's line-wrap setting (turn the current window's
automatic margins on or off). See section 11.8 Wrap.
- C-a s
- C-a C-s
- (xoff)
Send a ^S (ASCII XOFF) to the current window. See section 15.3 XON and XOFF.
- C-a S
- (split)
Split the current region into two new ones. See section 9. Regions.
- C-a t
- C-a C-t
- (time)
Show the load average and xref. See section 20.9 Time.
- C-a v
- (version)
Display the version and compilation date. See section 20.11 Version.
- C-a C-v
- (digraph)
Enter digraph. See section 11.3 Digraph.
- C-a w
- C-a C-w
- (windows)
Show a list of active windows. See section 10.7 Windows.
- C-a W
- (width)
Toggle between 80 and 132 columns. See section 11.10 Window Size.
- C-a x
- C-a C-x
- (lockscreen)
Lock your terminal. See section 8.3 Lock.
- C-a X
- (remove)
Kill the current region. See section 9. Regions.
- C-a z
- C-a C-z
- (suspend)
Suspend screen. See section 8.6 Suspend.
- C-a Z
- (reset)
Reset the virtual terminal to its "power-on" values.
See section 11.9 Reset.
- C-a .
- (dumptermcap)
Write out a `.termcap' file. See section 16.2 Write out the window's termcap entry.
- C-a ?
- (help)
Show key bindings. See section 14.4 Help.
- C-a C-\
- (quit)
Kill all windows and terminate screen. See section 8.7 Quit.
- C-a :
- (colon)
Enter a command line. See section 4.3 Colon.
- C-a [
- C-a C-[
- C-a ESC
- (copy)
Enter copy/scrollback mode. See section 12.1 Copying.
- C-a ]
- C-a C-]
- (paste .)
Write the contents of the paste buffer to the stdin queue of the
current window. See section 12.2 Paste.
- C-a {
- C-a }
- (history)
Copy and paste a previous (command) line. See section 12.5 History.
- C-a >
- (writebuf)
Write the paste buffer out to the screen-exchange file.
See section 12.4 Screen Exchange.
- C-a <
- (readbuf)
Read the screen-exchange file into the paste buffer.
See section 12.4 Screen Exchange.
- C-a =
- (removebuf)
Delete the screen-exchange file. See section 12.4 Screen Exchange.
- C-a _
- (silence)
Start/stop monitoring the current window for inactivity. See section 20.8 Silence,
- C-a ,
- (license)
Show the copyright page.
- C-a *
- (displays)
Show the listing of attached displays.
5.2 Command Summary
acladd usernames
- Allow other users in this session. See section 8.4 Multiuser Session.
aclchg usernames permbits list
- Change a user's permissions. See section 8.4 Multiuser Session.
acldel username
- Disallow other user in this session. See section 8.4 Multiuser Session.
aclgrp usrname [groupname]
- Inherit permissions granted to a group leader. See section 8.4 Multiuser Session.
aclumask [users]+/-bits ...
- Predefine access to new windows. See section 8.4.7 aclumask.
activity message
- Set the activity notification message. See section 10.6 Monitoring.
addacl usernames
- Synonym to
acladd. See section 8.4 Multiuser Session.
allpartial state
- Set all windows to partial refresh. See section 11.7 Redisplay.
altscreen state
- Enables support for the "alternate screen" terminal capability. See section 11.7 Redisplay.
at [ident][#|*|%] command [args]
- Execute a command at other displays or windows. See section 20.1 At.
attrcolor attrib [attribute/color-modifier]
- Map attributes to colors. See section 20.15 Attrcolor.
autodetach state
- Automatically detach the session on SIGHUP. See section 8.1 Detach.
autonuke state
- Enable a clear screen to discard unwritten output. See section 16.6 Autonuke.
backtick id lifespan autorefresh command [args]
- Define a command for the backtick string escape. See section 20.19 Backtick.
bce [state]
- Change background color erase. See section 11.11 Character Processing.
bell_msg [message]
- Set the bell notification message. See section 11.4 Bell.
bind [-c class] key [command [args]]
- Bind a command to a key. See section 14.1 The
bind command.
bindkey [opts] [string [cmd args]]
- Bind a string to a series of keystrokes. See section 14.5 Bindkey.
blanker
- Blank the screen. See section 20.20 Screen Saver.
blankerprg
- Define a blanker program. See section 20.20 Screen Saver.
break [duration]
- Send a break signal to the current window. See section 20.2 Break.
breaktype [tcsendbreak | TCSBRK | TIOCSBRK]
- Specify how to generate breaks. See section 20.2 Break.
bufferfile [exchange-file]
- Select a file for screen-exchange. See section 12.4 Screen Exchange.
c1 [state]
- Change c1 code processing. See section 11.11 Character Processing.
caption mode [string]
- Change caption mode and string. See section 9. Regions.
chacl usernames permbits list
- Synonym to
aclchg. See section 8.4 Multiuser Session.
charset set
- Change character set slot designation. See section 11.11 Character Processing.
chdir [directory]
- Change the current directory for future windows. See section 6.1 Chdir.
clear
- Clear the window screen. See section 11.5 Clear.
colon
- Enter a
screen command. See section 4.3 Colon.
command [-c class]
- Simulate the screen escape key. See section 14.3 Command Character.
compacthist [state]
- Selects compaction of trailing empty lines. See section 12.1.2 Scrollback.
console [state]
- Grab or ungrab console output. See section 10.2 Console.
copy
- Enter copy mode. See section 12.1 Copying.
copy_reg [key]
- Removed. Use
paste instead. See section 12.3 Registers.
crlf state
- Select line break behavior for copying. See section 12.1.1 CR/LF.
debug state
- Suppress/allow debugging output. See section 20.3 Debug.
defautonuke state
- Select default autonuke behavior. See section 16.6 Autonuke.
defbce state
- Select background color erase. See section 11.11 Character Processing.
defbreaktype [tcsendbreak | TCSBRK | TIOCSBRK]
- Specify the default for generating breaks. See section 20.2 Break.
defc1 state
- Select default c1 processing behavior. See section 11.11 Character Processing.
defcharset [set]
- Change defaul character set slot designation. See section 11.11 Character Processing.
defencoding enc
- Select default window encoding. See section 11.11 Character Processing.
defescape xy
- Set the default command and
meta characters. See section 14.3 Command Character.
defflow fstate
- Select default flow control behavior. See section 15.2 Flow.
defgr state
- Select default GR processing behavior. See section 11.11 Character Processing.
defhstatus [status]
- Select default window hardstatus line. See section 10.8 Hardstatus.
deflog state
- Select default window logging behavior. See section 18.2 log.
deflogin state
- Select default utmp logging behavior. See section 10.4 Login.
defmode mode
- Select default file mode for ptys. See section 10.5 Mode.
defmonitor state
- Select default activity monitoring behavior. See section 10.6 Monitoring.
defnonblock state|numsecs
- Select default nonblock mode. See section 20.6 Nonblock.
defobuflimit limit
- Select default output buffer limit. See section 16.7 Obuflimit.
defscrollback num
- Set default lines of scrollback. See section 12.1.2 Scrollback.
defshell command
- Set the default program for new windows. See section 6.4 Shell.
defsilence state
- Select default idle monitoring behavior. See section 20.8 Silence.
defslowpaste msec
- Select the default inter-character timeout when pasting. See section 12.2 Paste.
defutf8 state
- Select default character encoding. See section 11.11 Character Processing.
defwrap state
- Set default line-wrapping behavior. See section 11.8 Wrap.
defwritelock on|off|auto
- Set default writelock behavior. See section 8.4 Multiuser Session.
defzombie [keys]
- Keep dead windows. See section 20.12 Zombie.
detach [-h]
- Disconnect
screen from the terminal. See section 8.1 Detach.
digraph
- Enter digraph sequence. See section 11.3 Digraph.
dinfo
- Display terminal information. See section 11.6 Info.
displays
- List currently active user interfaces. See section 8.4.6 Displays.
dumptermcap
- Write the window's termcap entry to a file. See section 16.2 Write out the window's termcap entry.
echo [-n] message
- Display a message on startup. See section 19. Startup.
encoding enc [denc]
- Set the encoding of a window. See section 11.11 Character Processing.
escape xy
- Set the command and
meta characters. See section 14.3 Command Character.
eval command1 [command2 ...]
- Parse and execute each argument. See section 20.17 Eval.
exec [[fdpat] command [args ...]]
- Run a subprocess (filter). See section 13.1 Exec.
fit
- Change window size to current display size. See section 11.10 Window Size.
flow [fstate]
- Set flow control behavior. See section 15.2 Flow.
focus
- Move focus to next region. See section 9. Regions.
gr [state]
- Change GR charset processing. See section 11.11 Character Processing.
hardcopy [-h] [file]
- Write out the contents of the current window. See section 18.1 hardcopy.
hardcopy_append state
- Append to hardcopy files. See section 18.1 hardcopy.
hardcopydir directory
- Place, where to dump hardcopy files. See section 18.1 hardcopy.
hardstatus [state]
- Use the hardware status line. See section 17.2 Hardware Status Line.
height [lines [cols]]
- Set display height. See section 11.10 Window Size.
help [-c class]
- Display current key bindings. See section 14.4 Help.
history
- Find previous command beginning .... See section 12.5 History.
hstatus status
- Change the window's hardstatus line. See section 10.8 Hardstatus.
idle [timeout [cmd args]]
- Define a screen saver command. See section 20.20 Screen Saver.
ignorecase [state]
- Ignore character case in searches. See section 12.1.7 Searching.
info
- Display window settings. See section 11.6 Info.
ins_reg [key]
- Removed, use
paste instead. See section 12.3 Registers.
kill
- Destroy the current window. See section 10.3 Kill.
lastmsg
- Redisplay the last message. See section 17.3 Display Last Message.
license
- Display licensing information. See section 19. Startup.
lockscreen
- Lock the controlling terminal. See section 8.3 Lock.
log [state]
- Log all output in the current window. See section 18.2 log.
logfile filename
- Place where to collect logfiles. See section 18.2 log.
login [state]
- Log the window in `/var/run/utmp'. See section 10.4 Login.
logtstamp [state]
- Configure logfile time-stamps. See section 18.2 log.
mapdefault
- Use only the default mapping table for the next keystroke. See section 14.7 Bindkey Control.
mapnotnext
- Don't try to do keymapping on the next keystroke. See section 14.7 Bindkey Control.
maptimeout timo
- Set the inter-character timeout used for keymapping. See section 14.7 Bindkey Control.
markkeys string
- Rebind keys in copy mode. See section 12.1.3 markkeys.
maxwin n
- Set the maximum window number. See section 20.18 Maxwin.
meta
- Insert the command character. See section 14.3 Command Character.
monitor [state]
- Monitor activity in window. See section 10.6 Monitoring.
msgminwait sec
- Set minimum message wait. See section 17.4 Message Wait.
msgwait sec
- Set default message wait. See section 17.4 Message Wait.
multiuser state
- Go into single or multi user mode. See section 8.4 Multiuser Session.
nethack state
- Use
nethack-like error messages. See section 20.5 Nethack.
next
- Switch to the next window. See section 7. Selecting a Window.
nonblock [state|numsecs]
- Disable flow control to the current display. See section 20.6 Nonblock.|numsecs]
number [n]
- Change/display the current window's number. See section 20.7 Number.
obuflimit [limit]
- Select output buffer limit. See section 16.7 Obuflimit.
only
- Kill all other regions. See section 9. Regions.
other
- Switch to the window you were in last. See section 7. Selecting a Window.
partial state
- Set window to partial refresh. See section 11.7 Redisplay.
password [crypted_pw]
- Set reattach password. See section 8.1 Detach.
paste [src_regs [dest_reg]]
- Paste contents of paste buffer or registers somewhere. See section 12.2 Paste.
pastefont [state]
- Include font information in the paste buffer. See section 12.2 Paste.
pow_break
- Close and Reopen the window's terminal. See section 20.2 Break.
pow_detach
- Detach and hang up. See section 8.2 Power Detach.
pow_detach_msg [message]
- Set message displayed on
pow_detach. See section 8.2 Power Detach.
prev
- Switch to the previous window. See section 7. Selecting a Window.
printcmd [cmd]
- Set a command for VT100 printer port emulation. See section 20.13 Printcmd.
process [key]
- Treat a register as input to
screen. See section 12.3 Registers.
quit
- Kill all windows and exit. See section 8.7 Quit.
readbuf [-e encoding] [filename]
- Read the paste buffer from the screen-exchange file. See section 12.4 Screen Exchange.
readreg [-e encoding] [reg [file]]
- Load a register from paste buffer or file. See section 12.3 Registers.
redisplay
- Redisplay the current window. See section 11.7 Redisplay.
register [-e encoding] key string
- Store a string to a register. See section 12.3 Registers.
remove
- Kill current region. See section 9. Regions.
removebuf
- Delete the screen-exchange file. See section 12.4 Screen Exchange.
reset
- Reset the terminal settings for the window. See section 11.9 Reset.
resize [(+/-)lines]
- Grow or shrink a region
screen [opts] [n] [cmd [args]]
- Create a new window. See section 6.2 Screen Command.
scrollback num
- Set size of scrollback buffer. See section 12.1.2 Scrollback.
select [n]
- Switch to a specified window. See section 7. Selecting a Window.
sessionname [name]
- Name this session. See section 8.5 Session Name.
setenv [var [string]]
- Set an environment variable for new windows. See section 6.3 Setenv.
setsid state
- Controll process group creation for windows. See section 20.16 Setsid.
shell command
- Set the default program for new windows. See section 6.4 Shell.
shelltitle title
- Set the default name for new windows. See section 6.4 Shell.
silence [state|seconds]
- Monitor a window for inactivity. See section 20.8 Silence.
silencewait seconds
- Default timeout to trigger an inactivity notify. See section 20.8 Silence.
sleep num
- Pause during startup. See section 19. Startup.
slowpaste msec
- Slow down pasting in windows. See section 12.2 Paste.
source file
- Run commands from a file. See section 4.2 Source.
sorendition [attr [color]]
- Change text highlighting. See section 20.14 Sorendition.
split
- Split region into two parts. See section 9. Regions.
startup_message state
- Display copyright notice on startup. See section 19. Startup.
stuff string
- Stuff a string in the input buffer of a window. See section 12.2 Paste.
su [username [password [password2]]]
- Identify a user. See section 8.4 Multiuser Session.
suspend
- Put session in background. See section 8.6 Suspend.
term term
- Set
$TERM for new windows. See section 6.5 Term.
termcap term terminal-tweaks [window-tweaks]
- Tweak termcap entries for best performance. See section 16.3 The
termcap command.
terminfo term terminal-tweaks [window-tweaks]
- Ditto, for terminfo systems. See section 16.3 The
termcap command.
termcapinfo term terminal-tweaks [window-tweaks]
- Ditto, for both systems. See section 16.3 The
termcap command.
time [string]
- Display time and load average. See section 20.9 Time.
title [windowtitle]
- Set the name of the current window. See section 10.1.1 Title Command.
umask [users]+/-bits ...
- Synonym to
aclumask. See section 8.4.7 aclumask.
unsetenv var
- Unset environment variable for new windows. See section 6.3 Setenv.
utf8 [state [dstate]]
- Select character encoding of the current window. See section 11.11 Character Processing.
vbell [state]
- Use visual bell. See section 11.4 Bell.
vbell_msg [message]
- Set vbell message. See section 11.4 Bell.
vbellwait sec
- Set delay for vbell message. See section 11.4 Bell.
version
- Display
screen version. See section 20.11 Version.
wall message
- Write a message to all displays. See section 8.4 Multiuser Session.
width [cols [lines]]
- Set the width of the window. See section 11.10 Window Size.
windowlist [-b] | string [string] | title [title]
- Present a list of all windows for selection. See section 7.4 Windowlist.
windows
- List active windows. See section 10.7 Windows.
wrap [state]
- Control line-wrap behavior. See section 11.8 Wrap.
writebuf [-e encoding] [filename]
- Write paste buffer to screen-exchange file. See section 12.4 Screen Exchange.
writelock on|off|auto
- Grant exclusive write permission. See section 8.4 Multiuser Session.
xoff
- Send an XOFF character. See section 15.3 XON and XOFF.
xon
- Send an XON character. See section 15.3 XON and XOFF.
zmodem [off|auto|catch|pass]
- Define how screen treats zmodem requests. See section 20.21 Zmodem.
zombie [keys]
- Keep dead windows. See section 20.12 Zombie.
This document was generated
by Adam Lazur on November, 17 2003
using texi2html