]> git.ipfire.org Git - thirdparty/util-linux.git/blob - term-utils/setterm.1
docs: bring a few more man pages closer to standard formatting
[thirdparty/util-linux.git] / term-utils / setterm.1
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
6 .\"
7 .\" Most options documented by Colin Watson (cjw44@cam.ac.uk)
8 .\" Undocumented: -snow, -softscroll, -standout; these are
9 .\" commented out in the source
10 .\"
11 .TH SETTERM 1 "May 2014" "util-linux" "User Commands"
12 .SH NAME
13 setterm \- set terminal attributes
14 .SH SYNOPSIS
15 .B setterm
16 [options]
17 .SH DESCRIPTION
18 .B setterm
19 writes to standard output a character string that will invoke the specified
20 terminal capabilities. Where possible
21 .I terminfo
22 is consulted to find the string to use. Some options however (marked "virtual
23 consoles only" below) do not correspond to a
24 .BR terminfo (5)
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.
28 .SH OPTIONS
29 For boolean options
30 .RB ( on " or " off ),
31 the default is
32 .BR on .
33 .P
34 Below, an
35 .I 8-color
36 can be
37 .BR black ,
38 .BR red ,
39 .BR green ,
40 .BR yellow ,
41 .BR blue ,
42 .BR magenta ,
43 .BR cyan ,
44 or
45 .BR white .
46 .P
47 A
48 .I 16-color
49 can be an
50 .IR 8-color ,
51 or
52 .BR grey ,
53 or
54 .BR bright
55 followed
56 by
57 .BR red ,
58 .BR green ,
59 .BR yellow ,
60 .BR blue ,
61 .BR magenta ,
62 .BR cyan ,
63 or
64 .BR white .
65 .P
66 The various color options may be set independently, at least on virtual
67 consoles, though the results of setting multiple modes (for example,
68 .B \-\-underline
69 and
70 .BR \-\-half-bright )
71 are hardware-dependent.
72 .TP
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
76 .I vi and Cursor-Keys
77 section of the
78 .I Text-Terminal-HOWTO
79 for how this can cause problems for \fBvi\fR users.
80 .TP
81 \fB\-\-append\fP [\fIconsole_number\fP]
82 Like
83 .BR \-\-dump ,
84 but appends to the snapshot file instead of overwriting it. Only works if no
85 .B \-\-dump
86 options are given.
87 .TP
88 \fB\-\-background\fP \fI8-color\fP|\fBdefault\fP
89 Sets the background text color.
90 .TP
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).
95 .IP
96 The
97 .B force
98 option keeps the screen blank even if a key is pressed.
99 .IP
100 The
101 .B poke
102 option unblanks the screen.
103 .TP
104 \fB\-\-bfreq\fP [\fInumber\fP] (virtual consoles only)
105 Sets the bell frequency in Hertz. Without an argument, it defaults to
106 .BR 0 .
107 .TP
108 \fB\-\-blength\fP [\fB0-2000\fP] (virtual consoles only)
109 Sets the bell duration in milliseconds. Without an argument, it defaults to
110 .BR 0 .
111 .TP
112 .BR \-\-blink " [" on | off ]
113 Turns blink mode on or off. Except on a virtual console,
114 .B \-\-blink off
115 turns off all attributes (bold, half-brightness, blink, reverse).
116 .TP
117 .BR \-\-bold " [" on | off ]
118 Turns bold (extra bright) mode on or off. Except on a virtual console,
119 .B \-\-bold off
120 turns off all attributes (bold, half-brightness, blink, reverse).
121 .TP
122 \fB\-\-clear\fP [\fBall\fP|\fBrest\fP]
123 Without an argument or with the argument
124 .BR all ,
125 the entire screen is cleared and the cursor is set to the home position,
126 just like
127 .BR clear (1)
128 does. With the argument
129 .BR rest ,
130 the screen is cleared from the current cursor position to the end.
131 .TP
132 \fB\-\-clrtabs\fP [\fItab1 tab2 tab3\fP ...] (virtual consoles only)
133 Clears tab stops from the given horizontal cursor positions, in the range
134 .BR 1-160 .
135 Without arguments, it clears all tab stops.
136 .TP
137 .BR \-\-cursor " [" on | off ]
138 Turns the terminal's cursor on or off.
139 .TP
140 \fB\-\-default\fP
141 Sets the terminal's rendering options to the default values.
142 .TP
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
146 .B \-\-file
147 option, overwriting its contents; the default is
148 .IR screen.dump .
149 Without an argument, it dumps the current virtual console. This overrides
150 .BR \-\-append .
151 .TP
152 \fB\-\-file\fP \fIfilename\fP
153 Sets the snapshot file name for any
154 .B \-\-dump
155 or
156 .B \-\-append
157 options on the same command line. If this option is not present, the default
158 is
159 .I screen.dump
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.
162 .TP
163 \fB\-\-foreground\fP \fI8-color\fP|\fBdefault\fP
164 Sets the foreground text color.
165 .TP
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).
170 .TP
171 \fB\-\-hbcolor\fP \fI16-color\fP
172 Sets the color for bold characters.
173 .TP
174 \fB\-\-initialize\fP
175 Displays the terminal initialization string, which typically sets the
176 terminal's rendering options, and other attributes to the default values.
177 .TP
178 .BR \-\-inversescreen " [" on | off ]
179 Swaps foreground and background colors for the whole screen.
180 .TP
181 .BR \-\-linewrap " [" on | off ]
182 Makes the terminal continue on a new line when a line is full.
183 .TP
184 .BR \-\-msg " [" on | off "] (virtual consoles only)"
185 Enables or disables the sending of kernel
186 .BR printk()
187 messages to the console.
188 .TP
189 \fB\-\-msglevel\fP \fB0-8\fP (virtual consoles only)
190 Sets the console logging level for kernel
191 .B printk()
192 messages. All messages strictly more important than this will be printed, so a
193 logging level of
194 .B 0
195 has the same effect as
196 .B \-\-msg on
197 and a logging level of
198 .B 8
199 will print all kernel messages.
200 .BR klogd (8)
201 may be a more convenient interface to the logging of kernel messages.
202 .TP
203 \fB\-\-powerdown\fP [\fB0-60\fP]
204 Sets the VESA powerdown interval in minutes. Without an argument, it defaults
205 to
206 .B 0
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.
210 .TP
211 \fB\-\-powersave\fP \fBoff\fP
212 Turns off monitor VESA powersaving features.
213 .TP
214 \fB\-\-powersave\fP \fBon\fP|\fBvsync\fP
215 Puts the monitor into VESA vsync suspend mode.
216 .TP
217 \fB\-\-powersave\fP \fBpowerdown\fP
218 Puts the monitor into VESA powerdown mode.
219 .TP
220 \fB\-\-powersave\fP \fBhsync\fP
221 Puts the monitor into VESA hsync suspend mode.
222 .TP
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
226 .BR 8 .
227 .TP
228 .BR \-\-repeat " [" on | off "] (virtual consoles only)"
229 Turns keyboard repeat on or off.
230 .TP
231 \fB\-\-reset\fP
232 Displays the terminal reset string, which typically resets the terminal to
233 its power-on state.
234 .TP
235 \fB\-\-reverse\fP [\fBon\fP|\fBoff\fP]
236 Turns reverse video mode on or off. Except on a virtual console,
237 .B \-\-reverse off
238 turns off all attributes (bold, half-brightness, blink, reverse).
239 .TP
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.
243 .TP
244 \fB\-\-tabs\fP [\fItab1 tab2 tab3\fP ...]
245 Sets tab stops at the given horizontal cursor positions, in the range
246 .BR 1-160 .
247 Without arguments, it shows the current tab stop settings.
248 .TP
249 \fB\-\-term\fP \fIterminal_name\fP
250 Overrides the TERM environment variable.
251 .TP
252 \fB\-\-ulcolor\fP \fI16-color\fP (virtual consoles only)
253 Sets the color for underlined characters.
254 .TP
255 .BR \-\-underline " [" on | off ]
256 Turns underline mode on or off.
257 .TP
258 \fB\-\-version\fP
259 Displays version information and exits.
260 .TP
261 \fB\-\-help\fP
262 Displays a help text and exits.
263 .SH COMPATIBILITY
264 Since version 2.25
265 .B setterm
266 has support for long options with two hyphens, for example
267 .BR \-\-help ,
268 beside the historical long options with a single hyphen, for example
269 .BR \-help .
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.
273 .SH "SEE ALSO"
274 .BR tput (1),
275 .BR stty (1),
276 .BR terminfo (5),
277 .BR tty (4)
278 .SH BUGS
279 Differences between the Minix and Linux versions are not documented.
280 .SH AVAILABILITY
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/
283 Linux Kernel Archive
284 .UE .