1 .\" Copyright 1990 Gordon Irlam (gordoni@cs.ua.oz.au)
2 .\" Copyright 1992 Rickard E. Faith (faith@cs.unc.edu)
3 .\" Copyright 2000 Colin Watson (cjw44@cam.ac.uk)
4 .\" Do not restrict distribution.
5 .\" May be distributed under the GNU General Public License
7 .TH SETTERM 1 "May 2014" "util-linux" "User Commands"
9 setterm \- set terminal attributes
15 writes to standard output a character string that will invoke the specified
16 terminal capabilities. Where possible
18 is consulted to find the string to use. Some options however (marked "virtual
19 consoles only" below) do not correspond to a
21 capability. In this case, if the terminal type is "con" or "linux" the string
22 that invokes the specified capabilities on the PC Minix virtual console driver
23 is output. Options that are not implemented by the terminal are ignored.
26 .RB ( on " or " off ),
62 The various color options may be set independently, at least on virtual
63 consoles, though the results of setting multiple modes (for example,
66 .BR \-\-half\-bright )
67 are hardware-dependent.
69 \fB\-\-appcursorkeys\fP [\fBon\fP|\fBoff\fP] (virtual consoles only)
70 Sets Cursor Key Application Mode on or off. When on, ESC O A, ESC O B, etc.
71 will be sent for the cursor keys instead of ESC [ A, ESC [ B, etc. See the
74 .I Text-Terminal-HOWTO
75 for how this can cause problems for \fBvi\fR users.
77 \fB\-\-append\fP [\fIconsole_number\fP]
80 but appends to the snapshot file instead of overwriting it. Only works if no
84 \fB\-\-background\fP \fI8-color\fP|\fBdefault\fP
85 Sets the background text color.
87 \fB\-\-blank\fP [\fB0-60\fP|\fBforce\fP|\fBpoke\fP] (virtual consoles only)
88 Sets the interval of inactivity, in minutes, after which the screen will be
89 automatically blanked (using APM if available). Without an argument, it gets
90 the blank status (returns which vt was blanked, or zero for an unblanked vt).
94 option keeps the screen blank even if a key is pressed.
98 option unblanks the screen.
100 \fB\-\-bfreq\fP [\fInumber\fP] (virtual consoles only)
101 Sets the bell frequency in Hertz. Without an argument, it defaults to
104 \fB\-\-blength\fP [\fB0-2000\fP] (virtual consoles only)
105 Sets the bell duration in milliseconds. Without an argument, it defaults to
108 .BR \-\-blink " [" on | off ]
109 Turns blink mode on or off. Except on a virtual console,
111 turns off all attributes (bold, half-brightness, blink, reverse).
113 .BR \-\-bold " [" on | off ]
114 Turns bold (extra bright) mode on or off. Except on a virtual console,
116 turns off all attributes (bold, half-brightness, blink, reverse).
118 \fB\-\-clear\fP [\fBall\fP|\fBrest\fP]
119 Without an argument or with the argument
121 the entire screen is cleared and the cursor is set to the home position,
124 does. With the argument
126 the screen is cleared from the current cursor position to the end.
128 \fB\-\-clrtabs\fP [\fItab1 tab2 tab3\fP ...] (virtual consoles only)
129 Clears tab stops from the given horizontal cursor positions, in the range
131 Without arguments, it clears all tab stops.
133 .BR \-\-cursor " [" on | off ]
134 Turns the terminal's cursor on or off.
137 Sets the terminal's rendering options to the default values.
139 \fB\-\-dump\fP [\fIconsole_number\fP]
140 Writes a snapshot of the virtual console with the given number
141 to the file specified with the
143 option, overwriting its contents; the default is
145 Without an argument, it dumps the current virtual console. This overrides
148 \fB\-\-file\fP \fIfilename\fP
149 Sets the snapshot file name for any
153 options on the same command line. If this option is not present, the default
156 in the current directory. A path name that exceeds the system maximum will be
157 truncated, see PATH_MAX from linux/limits.h for the value.
159 \fB\-\-foreground\fP \fI8-color\fP|\fBdefault\fP
160 Sets the foreground text color.
162 .BR \-\-half\-bright " [" on | off ]
163 Turns dim (half-brightness) mode on or off. Except on a virtual console,
164 .B \-\-half\-bright off
165 turns off all attributes (bold, half-brightness, blink, reverse).
167 \fB\-\-hbcolor\fP \fI16-color\fP
168 Sets the color for bold characters.
171 Displays the terminal initialization string, which typically sets the
172 terminal's rendering options, and other attributes to the default values.
174 .BR \-\-inversescreen " [" on | off ]
175 Swaps foreground and background colors for the whole screen.
177 .BR \-\-linewrap " [" on | off ]
178 Makes the terminal continue on a new line when a line is full.
180 .BR \-\-msg " [" on | off "] (virtual consoles only)"
181 Enables or disables the sending of kernel
183 messages to the console.
185 \fB\-\-msglevel\fP \fB0-8\fP (virtual consoles only)
186 Sets the console logging level for kernel
188 messages. All messages strictly more important than this will be printed, so a
191 has the same effect as
193 and a logging level of
195 will print all kernel messages.
197 may be a more convenient interface to the logging of kernel messages.
199 \fB\-\-powerdown\fP [\fB0-60\fP]
200 Sets the VESA powerdown interval in minutes. Without an argument, it defaults
203 (disable powerdown). If the console is blanked or the monitor is in suspend
204 mode, then the monitor will go into vsync suspend mode or powerdown mode
205 respectively after this period of time has elapsed.
207 \fB\-\-powersave\fP \fBoff\fP
208 Turns off monitor VESA powersaving features.
210 \fB\-\-powersave\fP \fBon\fP|\fBvsync\fP
211 Puts the monitor into VESA vsync suspend mode.
213 \fB\-\-powersave\fP \fBpowerdown\fP
214 Puts the monitor into VESA powerdown mode.
216 \fB\-\-powersave\fP \fBhsync\fP
217 Puts the monitor into VESA hsync suspend mode.
219 \fB\-\-regtabs\fP [\fB1-160\fP] (virtual consoles only)
220 Clears all tab stops, then sets a regular tab stop pattern, with one tab every
221 specified number of positions. Without an argument, it defaults to
224 .BR \-\-repeat " [" on | off "] (virtual consoles only)"
225 Turns keyboard repeat on or off.
228 Displays the terminal reset string, which typically resets the terminal to
231 \fB\-\-reverse\fP [\fBon\fP|\fBoff\fP]
232 Turns reverse video mode on or off. Except on a virtual console,
234 turns off all attributes (bold, half-brightness, blink, reverse).
236 \fB\-\-store\fP (virtual consoles only)
237 Stores the terminal's current rendering options (foreground and background
238 colors) as the values to be used at reset-to-default.
240 \fB\-\-tabs\fP [\fItab1 tab2 tab3\fP ...]
241 Sets tab stops at the given horizontal cursor positions, in the range
243 Without arguments, it shows the current tab stop settings.
245 \fB\-\-term\fP \fIterminal_name\fP
246 Overrides the TERM environment variable.
248 \fB\-\-ulcolor\fP \fI16-color\fP (virtual consoles only)
249 Sets the color for underlined characters.
251 .BR \-\-underline " [" on | off ]
252 Turns underline mode on or off.
255 Displays version information and exits.
258 Displays a help text and exits.
262 has support for long options with two hyphens, for example
264 beside the historical long options with a single hyphen, for example
266 In scripts it is better to use the backward-compatible single hyphen
267 rather than the double hyphen. Currently there are no plans nor good
268 reasons to discontinue single-hyphen compatibility.
275 Differences between the Minix and Linux versions are not documented.
277 The setterm command is part of the util-linux package and is available from
278 .UR ftp://\:ftp.kernel.org\:/pub\:/linux\:/utils\:/util-linux/