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