1 .\" Copyright 1990 Gordon Irlam (gordoni@cs.ua.oz.au)
2 .\" Copyright 1992 Rickard E. Faith (faith@cs.unc.edu)
3 .\" Most of this was copied from the source code.
4 .\" Do not restrict distribution.
5 .\" May be distributed under the GNU General Public License
7 .\" Most options documented by Colin Watson (cjw44@cam.ac.uk)
8 .\" Undocumented: -snow, -softscroll, -standout; these are
9 .\" commented out in the source
11 .TH SETTERM 1 "7 January 2000" "Util-Linux 2.10" "Linux Programmer's Manual"
13 setterm \- set terminal attributes
16 .BR "setterm " [ options ]
20 writes to standard output a character string that will invoke the
21 specified terminal capabilities. Where possible
23 is consulted to find the string to use. Some options however (marked
24 "virtual consoles only" below) do not correspond to a
26 capability. In this case, if the terminal type is "con" or "linux" the
27 string that invokes the specified capabilities on the PC Minix virtual
28 console driver is output. Options that are not implemented by the terminal
31 For boolean options (\fBon\fP or \fBoff\fP), the default is \fBon\fP.
33 For conciseness, an \fI8-color\fP below is \fBblack\fP, \fBred\fP,
34 \fBgreen\fP, \fByellow\fP, \fBblue\fP, \fBmagenta\fP, \fBcyan\fP, or
37 A \fI16-color\fP is an \fI8-color\fP, \fBgrey\fP, or \fBbright\fP followed
38 by \fBred\fP, \fBgreen\fP, \fByellow\fP, \fBblue\fP, \fBmagenta\fP,
39 \fBcyan\fP, or \fBwhite\fP.
41 The various color options may be set independently, at least at virtual
42 consoles, though the results of setting multiple modes (for example,
43 .BR \-underline " and " \-half-bright )
44 are hardware-dependent.
46 .BR \-term " terminal_name"
47 Overrides the TERM environment variable.
50 Displays the terminal reset string, which typically resets the terminal to
54 Displays the terminal initialization string, which typically sets the
55 terminal's rendering options, and other attributes to the default values.
57 .BR \-cursor " [" on | off ]
58 Turns the terminal's cursor on or off.
60 .BR \-repeat " [" on | off "] (virtual consoles only)"
61 Turns keyboard repeat on or off.
63 .BR \-appcursorkeys " [" on | off "] (virtual consoles only)"
64 Sets Cursor Key Application Mode on or off. When on, ESC O A, ESC O B, etc.
65 will be sent for the cursor keys instead of ESC [ A, ESC [ B, etc. See the
66 "vi and Cursor-Keys" section of the Text-Terminal-HOWTO for how this can
67 cause problems for vi users.
69 .BR \-linewrap " [" on | off "] (virtual consoles only)"
70 Turns automatic line-wrapping on or off.
73 Sets the terminal's rendering options to the default values.
75 \fB\-foreground\fP \fI8-color\fP|\fBdefault\fP (virtual consoles only)
76 Sets the foreground text color.
78 \fB\-background\fP \fI8-color\fP|\fBdefault\fP (virtual consoles only)
79 Sets the background text color.
81 \fB\-ulcolor\fP \fI16-color\fP (virtual consoles only)
82 Sets the color for underlined characters.
84 \fB\-hbcolor\fP \fI16-color\fP (virtual consoles only)
85 Sets the color for half-bright characters.
87 .BR \-inversescreen " [" on | off "] (virtual consoles only)"
88 Inverts the screen colors. Foreground and background are swapped, as are
89 underline and half-brightness.
91 .BR \-bold " [" on | off ]
92 Turns bold (extra bright) mode on or off. Except at a virtual console,
93 \fB\-bold off\fP turns off all attributes (bold, half-brightness, blink,
96 .BR \-half-bright " [" on | off ]
97 Turns dim (half-brightness) mode on or off (see \fB\-hbcolor\fP). Except at
98 a virtual console, \fB\-half-bright off\fP turns off all attributes (bold,
99 half-brightness, blink, reverse).
101 .BR \-blink " [" on | off ]
102 Turns blink mode on or off. Except at a virtual console, \fB\-blink off\fP
103 turns off all attributes (bold, half-brightness, blink, reverse).
105 .BR \-reverse " [" on | off ]
106 Turns reverse video mode on or off. Except at a virtual console,
107 \fB\-reverse off\fP turns off all attributes (bold, half-brightness, blink,
110 .BR \-underline " [" on | off ]
111 Turns underline mode on or off (see \fB\-ulcolor\fP).
113 .BR \-store " (virtual consoles only)"
114 Stores the terminal's current rendering options (foreground and
115 background colors) as the values to be used at reset-to-default.
117 .BR \-clear " [" all ]
118 Clears the screen and "homes" the cursor, as
122 Clears from the current cursor position to the end of the screen.
124 .BR \-tabs " [tab1 tab2 tab3 ...] (virtual consoles only)"
125 Sets tab stops at the given horizontal cursor positions, in the range 1-160.
126 Without arguments, shows the current tab stop settings.
128 .BR \-clrtabs " [tab1 tab2 tab3 ...] (virtual consoles only)"
129 Clears tab stops from the given horizontal cursor positions, in the range
130 1-160. Without arguments, clears all tab stops.
132 .BR \-regtabs " [1-160] (virtual consoles only)"
133 Clears all tab stops, then sets a regular tab stop pattern, with one tab
134 every specified number of positions. Without an argument, defaults to 8.
136 .BR \-blank " [0-60] (virtual consoles only)"
137 Sets the interval of inactivity, in minutes, after which the screen will be
138 automatically blanked (using APM if available). Without an argument,
139 defaults to 0 (disable console blanking).
141 .BR \-dump " [1-NR_CONS]"
142 Writes a snapshot of the given virtual console (with attributes) to the file
143 specified in the \fB\-file\fP option, overwriting its contents; the default
144 is screen.dump. Without an argument, dumps the current virtual console.
145 Overrides \fB\-append\fP.
147 .BR \-append " [1-NR_CONS]"
148 Like \fB\-dump\fP, but appends to the snapshot file instead of overwriting
149 it. Only works if no \fB\-dump\fP options are given.
151 .BR \-file " dumpfilename"
152 Sets the snapshot file name for any \fB\-dump\fP or \fB\-append\fP options
153 on the same command line. If this option is not present, the default is
154 screen.dump in the current directory.
156 .BR \-msg " [" on | off "] (virtual consoles only)"
157 Enables or disables the sending of kernel \fBprintk()\fP messages to the
160 .BR \-msglevel " 1-8 (virtual consoles only)"
161 Sets the console logging level for kernel \fBprintk()\fP messages. All
162 messages strictly more important than this will be printed, so a logging
163 level of 0 has the same effect as \fB\-msg on\fP and a logging level of 8
164 will print all kernel messages.
166 may be a more convenient interface to the logging of kernel messages.
168 .BR "\-powersave on" | vsync
169 Puts the monitor into VESA vsync suspend mode.
172 Puts the monitor into VESA hsync suspend mode.
174 .B \-powersave powerdown
175 Puts the monitor into VESA powerdown mode.
177 .BR \-powersave " [" off "]"
178 Turns off monitor VESA powersaving features.
180 .BR \-powerdown " [0-60]"
181 Sets the VESA powerdown interval in minutes. Without an argument, defaults
182 to 0 (disable powerdown). If the console is blanked or the monitor is in
183 suspend mode, then the monitor will go into vsync suspend mode or powerdown
184 mode respectively after this period of time has elapsed.
186 .BR \-blength " [0-2000]"
187 Sets the bell duration in milliseconds. Without an argument, defaults to 0.
189 .BR \-bfreq " [freqnumber]"
190 Sets the bell frequency in Hz. Without an argument, defaults to 0.
197 Differences between the Minix and Linux versions are not documented.