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 "May 2014" "util-linux" "User Commands"
13 setterm \- set terminal attributes
19 writes to standard output a character string that will invoke the specified
20 terminal capabilities. Where possible
22 is consulted to find the string to use. Some options however (marked "virtual
23 consoles only" below) do not correspond to a
25 capability. In this case, if the terminal type is "con" or "linux" the string
26 that invokes the specified capabilities on the PC Minix virtual console driver
27 is output. Options that are not implemented by the terminal are ignored.
30 .RB ( on " or " off ),
66 The various color options may be set independently, at least on virtual
67 consoles, though the results of setting multiple modes (for example,
71 are hardware-dependent.
73 \fB\-\-appcursorkeys\fP [\fBon\fP|\fBoff\fP] (virtual consoles only)
74 Sets Cursor Key Application Mode on or off. When on, ESC O A, ESC O B, etc.
75 will be sent for the cursor keys instead of ESC [ A, ESC [ B, etc. See the
78 .I Text-Terminal-HOWTO
79 for how this can cause problems for \fBvi\fR users.
81 \fB\-\-append\fP [\fIconsole_number\fP]
84 but appends to the snapshot file instead of overwriting it. Only works if no
88 \fB\-\-background\fP \fI8-color\fP|\fBdefault\fP
89 Sets the background text color.
91 \fB\-\-blank\fP [\fB0-60\fP|\fBforce\fP|\fBpoke\fP] (virtual consoles only)
92 Sets the interval of inactivity, in minutes, after which the screen will be
93 automatically blanked (using APM if available). Without an argument, it gets
94 the blank status (returns which vt was blanked, or zero for an unblanked vt).
98 option keeps the screen blank even if a key is pressed.
102 option unblanks the screen.
104 \fB\-\-bfreq\fP [\fInumber\fP] (virtual consoles only)
105 Sets the bell frequency in Hertz. Without an argument, it defaults to
108 \fB\-\-blength\fP [\fB0-2000\fP] (virtual consoles only)
109 Sets the bell duration in milliseconds. Without an argument, it defaults to
112 .BR \-\-blink " [" on | off ]
113 Turns blink mode on or off. Except on a virtual console,
115 turns off all attributes (bold, half-brightness, blink, reverse).
117 .BR \-\-bold " [" on | off ]
118 Turns bold (extra bright) mode on or off. Except on a virtual console,
120 turns off all attributes (bold, half-brightness, blink, reverse).
122 \fB\-\-clear\fP [\fBall\fP|\fBrest\fP]
123 Without an argument or with the argument
125 the entire screen is cleared and the cursor is set to the home position,
128 does. With the argument
130 the screen is cleared from the current cursor position to the end.
132 \fB\-\-clrtabs\fP [\fItab1 tab2 tab3\fP ...] (virtual consoles only)
133 Clears tab stops from the given horizontal cursor positions, in the range
135 Without arguments, it clears all tab stops.
137 .BR \-\-cursor " [" on | off ]
138 Turns the terminal's cursor on or off.
141 Sets the terminal's rendering options to the default values.
143 \fB\-\-dump\fP [\fIconsole_number\fP]
144 Writes a snapshot of the virtual console with the given number
145 to the file specified with the
147 option, overwriting its contents; the default is
149 Without an argument, it dumps the current virtual console. This overrides
152 \fB\-\-file\fP \fIfilename\fP
153 Sets the snapshot file name for any
157 options on the same command line. If this option is not present, the default
160 in the current directory. A path name that exceeds the system maximum will be
161 truncated, see PATH_MAX from linux/limits.h for the value.
163 \fB\-\-foreground\fP \fI8-color\fP|\fBdefault\fP
164 Sets the foreground text color.
166 .BR \-\-half-bright " [" on | off ]
167 Turns dim (half-brightness) mode on or off. Except on a virtual console,
168 .B \-\-half-bright off
169 turns off all attributes (bold, half-brightness, blink, reverse).
171 \fB\-\-hbcolor\fP \fI16-color\fP
172 Sets the color for bold characters.
175 Displays the terminal initialization string, which typically sets the
176 terminal's rendering options, and other attributes to the default values.
178 .BR \-\-inversescreen " [" on | off ]
179 Swaps foreground and background colors for the whole screen.
181 .BR \-\-linewrap " [" on | off ]
182 Makes the terminal continue on a new line when a line is full.
184 .BR \-\-msg " [" on | off "] (virtual consoles only)"
185 Enables or disables the sending of kernel
187 messages to the console.
189 \fB\-\-msglevel\fP \fB0-8\fP (virtual consoles only)
190 Sets the console logging level for kernel
192 messages. All messages strictly more important than this will be printed, so a
195 has the same effect as
197 and a logging level of
199 will print all kernel messages.
201 may be a more convenient interface to the logging of kernel messages.
203 \fB\-\-powerdown\fP [\fB0-60\fP]
204 Sets the VESA powerdown interval in minutes. Without an argument, it defaults
207 (disable powerdown). If the console is blanked or the monitor is in suspend
208 mode, then the monitor will go into vsync suspend mode or powerdown mode
209 respectively after this period of time has elapsed.
211 \fB\-\-powersave\fP \fBoff\fP
212 Turns off monitor VESA powersaving features.
214 \fB\-\-powersave\fP \fBon\fP|\fBvsync\fP
215 Puts the monitor into VESA vsync suspend mode.
217 \fB\-\-powersave\fP \fBpowerdown\fP
218 Puts the monitor into VESA powerdown mode.
220 \fB\-\-powersave\fP \fBhsync\fP
221 Puts the monitor into VESA hsync suspend mode.
223 \fB\-\-regtabs\fP [\fB1-160\fP] (virtual consoles only)
224 Clears all tab stops, then sets a regular tab stop pattern, with one tab every
225 specified number of positions. Without an argument, it defaults to
228 .BR \-\-repeat " [" on | off "] (virtual consoles only)"
229 Turns keyboard repeat on or off.
232 Displays the terminal reset string, which typically resets the terminal to
235 \fB\-\-reverse\fP [\fBon\fP|\fBoff\fP]
236 Turns reverse video mode on or off. Except on a virtual console,
238 turns off all attributes (bold, half-brightness, blink, reverse).
240 \fB\-\-store\fP (virtual consoles only)
241 Stores the terminal's current rendering options (foreground and background
242 colors) as the values to be used at reset-to-default.
244 \fB\-\-tabs\fP [\fItab1 tab2 tab3\fP ...]
245 Sets tab stops at the given horizontal cursor positions, in the range
247 Without arguments, it shows the current tab stop settings.
249 \fB\-\-term\fP \fIterminal_name\fP
250 Overrides the TERM environment variable.
252 \fB\-\-ulcolor\fP \fI16-color\fP (virtual consoles only)
253 Sets the color for underlined characters.
255 .BR \-\-underline " [" on | off ]
256 Turns underline mode on or off.
259 Displays version information and exits.
262 Displays a help text and exits.
266 has support for long options with two hyphens, for example
268 beside the historical long options with a single hyphen, for example
270 In scripts it is better to use the backward-compatible single hyphen
271 rather than the double hyphen. Currently there are no plans nor good
272 reasons to discontinue single-hyphen compatibility.
279 Differences between the Minix and Linux versions are not documented.
281 The setterm command is part of the util-linux package and is available from
282 .UR ftp://\:ftp.kernel.org\:/pub\:/linux\:/utils\:/util-linux/