]> git.ipfire.org Git - thirdparty/util-linux.git/blob - term-utils/setterm.1
Merge branch '2014wk19' of git://github.com/kerolasa/lelux-utiliteetit
[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 "January 2000" "util-linux" "User Commands"
12 .SH NAME
13 setterm \- set terminal attributes
14 .SH SYNOPSIS
15 .B setterm
16 .RI [ options ]
17 .SH DESCRIPTION
18 .B setterm
19 writes to standard output a character string that will invoke the
20 specified terminal capabilities. Where possible
21 .I terminfo
22 is consulted to find the string to use. Some options however (marked
23 "virtual 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
26 string that invokes the specified capabilities on the PC Minix virtual
27 console driver is output. Options that are not implemented by the terminal
28 are ignored.
29 .SH OPTIONS
30 For boolean options (\fBon\fP or \fBoff\fP), the default is \fBon\fP.
31 .P
32 For conciseness, an \fI8-color\fP below is \fBblack\fP, \fBred\fP,
33 \fBgreen\fP, \fByellow\fP, \fBblue\fP, \fBmagenta\fP, \fBcyan\fP, or
34 \fBwhite\fP.
35 .P
36 A \fI16-color\fP is an \fI8-color\fP, \fBgrey\fP, or \fBbright\fP followed
37 by \fBred\fP, \fBgreen\fP, \fByellow\fP, \fBblue\fP, \fBmagenta\fP,
38 \fBcyan\fP, or \fBwhite\fP.
39 .P
40 The various color options may be set independently, at least at virtual
41 consoles, though the results of setting multiple modes (for example,
42 .BR \-\-underline " and " \-\-half-bright )
43 are hardware-dependent.
44 .TP
45 .BR \-\-appcursorkeys " [" on | off "] (virtual consoles only)"
46 Sets Cursor Key Application Mode on or off. When on, ESC O A, ESC O B, etc.
47 will be sent for the cursor keys instead of ESC [ A, ESC [ B, etc. See the
48 "vi and Cursor-Keys" section of the Text-Terminal-HOWTO for how this can
49 cause problems for vi users.
50 .TP
51 .BR \-\-append " [\fI1-NR_CONS\fP]"
52 Like \fB\-\-dump\fP, but appends to the snapshot file instead of overwriting
53 it. Only works if no \fB\-\-dump\fP options are given.
54 .TP
55 \fB\-\-background\fP \fI8-color\fP|\fBdefault\fP (virtual consoles only)
56 Sets the background text color.
57 .TP
58 .BR \-\-blank " [\fI0-60\fP|\fBforce\fP|\fBpoke\fP] (virtual consoles only)"
59 Sets the interval of inactivity, in minutes, after which the screen will be
60 automatically blanked (using APM if available). Without an argument, gets the
61 blank status (returns which vt was blanked or zero for unblanked vt).
62
63 The
64 .B force
65 option keeps screen blank even if a key is pressed.
66
67 The
68 .B poke
69 option unblank the screen.
70 .TP
71 .BR \-\-bfreq " [\fIfreqnumber\fP]"
72 Sets the bell frequency in Hz. Without an argument, defaults to 0.
73 .TP
74 .BR \-\-blength " [\fI0-2000\fP]"
75 Sets the bell duration in milliseconds. Without an argument, defaults to 0.
76 .TP
77 .BR \-\-blink " [" on | off ]
78 Turns blink mode on or off. Except at a virtual console, \fB\-\-blink off\fP
79 turns off all attributes (bold, half-brightness, blink, reverse).
80 .TP
81 .BR \-\-bold " [" on | off ]
82 Turns bold (extra bright) mode on or off. Except at a virtual console,
83 \fB\-\-bold off\fP turns off all attributes (bold, half-brightness, blink,
84 reverse).
85 .TP
86 .BR \-\-clear " [" all ]
87 Clears the screen and "homes" the cursor, as
88 .BR clear (1).
89 .TP
90 .B \-\-clear rest
91 Clears from the current cursor position to the end of the screen.
92 .TP
93 .BR \-\-clrtabs " [\fItab1 tab2 tab3\fP ...] (virtual consoles only)"
94 Clears tab stops from the given horizontal cursor positions, in the range
95 1-160. Without arguments, clears all tab stops.
96 .TP
97 .BR \-\-cursor " [" on | off ]
98 Turns the terminal's cursor on or off.
99 .TP
100 .B \-\-default
101 Sets the terminal's rendering options to the default values.
102 .TP
103 .BR \-\-dump " [\fI1-NR_CONS\fP]"
104 Writes a snapshot of the given virtual console to the file
105 specified in the \fB\-\-file\fP option, overwriting its contents; the default
106 is screen.dump. Without an argument, dumps the current virtual console.
107 Overrides \fB\-\-append\fP.
108 .TP
109 .BR \-\-append " [\fI1-NR_CONS\fP]"
110 Like \fB\-\-dump\fP, but appends to the snapshot file instead of overwriting
111 it. Only works if no \fB\-\-dump\fP options are given.
112 .TP
113 .BI \-\-file " dumpfilename"
114 Sets the snapshot file name for any \fB\-\-dump\fP or \fB\-\-append\fP options
115 on the same command line. If this option is not present, the default is
116 screen.dump in the current directory. A path name that exceeds system
117 maximum will be truncated, see PATH_MAX from linux/limits.h for the value.
118 .TP
119 .BR \-\-msg " [" on | off "] (virtual consoles only)"
120 Enables or disables the sending of kernel \fBprintk()\fP messages to the
121 console.
122 .TP
123 .BR \-\-msglevel " \fI1-8\fP (virtual consoles only)"
124 Sets the console logging level for kernel \fBprintk()\fP messages. All
125 messages strictly more important than this will be printed, so a logging
126 level of 0 has the same effect as \fB\-\-msg on\fP and a logging level of 8
127 will print all kernel messages.
128 .BR klogd (8)
129 may be a more convenient interface to the logging of kernel messages.
130 .TP
131 .BR \-\-powerdown " [\fI0-60\fP]"
132 Sets the VESA powerdown interval in minutes. Without an argument, defaults
133 to 0 (disable powerdown). If the console is blanked or the monitor is in
134 suspend mode, then the monitor will go into vsync suspend mode or powerdown
135 mode respectively after this period of time has elapsed.
136 .TP
137 .BR \-\-underline " [" on | off ]
138 Turns underline mode on or off (see \fB\-\-ulcolor\fP).
139 .TP
140 .BR \-\-powersave " [" off "]"
141 Turns off monitor VESA powersaving features.
142 .TP
143 .BR "\-\-powersave on" | vsync
144 Puts the monitor into VESA vsync suspend mode.
145 .TP
146 .B \-\-powersave powerdown
147 Puts the monitor into VESA powerdown mode.
148 .TP
149 .B \-\-powersave hsync
150 Puts the monitor into VESA hsync suspend mode.
151 .TP
152 .BR \-\-regtabs " [\fI1-160\fP] (virtual consoles only)"
153 Clears all tab stops, then sets a regular tab stop pattern, with one tab
154 every specified number of positions. Without an argument, defaults to 8.
155 .TP
156 .BR \-\-repeat " [" on | off "] (virtual consoles only)"
157 Turns keyboard repeat on or off.
158 .TP
159 .B \-\-reset
160 Displays the terminal reset string, which typically resets the terminal to
161 its power on state.
162 .TP
163 .BR \-\-reverse " [" on | off ]
164 Turns reverse video mode on or off. Except at a virtual console,
165 \fB\-\-reverse off\fP turns off all attributes (bold, half-brightness, blink,
166 reverse).
167 .TP
168 .BR \-\-store " (virtual consoles only)"
169 Stores the terminal's current rendering options (foreground and
170 background colors) as the values to be used at reset-to-default.
171 .TP
172 .BR \-\-tabs " [\fItab1 tab2 tab3\fP ...] (virtual consoles only)"
173 Sets tab stops at the given horizontal cursor positions, in the range 1-160.
174 Without arguments, shows the current tab stop settings.
175 .TP
176 .BR \-\-term " terminal_name"
177 Overrides the TERM environment variable.
178 .TP
179 \fB\-\-ulcolor\fP \fI16-color\fP (virtual consoles only)
180 Sets the color for underlined characters.
181 .TP
182 .BR \-\-version
183 Display version information and exit.
184 .TP
185 .BR \-\-help
186 Display help text and exit.
187 .SH "SEE ALSO"
188 .BR tput (1),
189 .BR stty (1),
190 .BR terminfo (5),
191 .BR tty (4)
192 .SH BUGS
193 Differences between the Minix and Linux versions are not documented.
194 .SH AVAILABILITY
195 The setterm command is part of the util-linux package and is available from
196 ftp://ftp.kernel.org/pub/linux/utils/util-linux/.