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