1SETTERM(1)                       User Commands                      SETTERM(1)
2
3
4

NAME

6       setterm - set terminal attributes
7

SYNOPSIS

9       setterm [options]
10

DESCRIPTION

12       setterm writes to standard output a character string that will invoke
13       the specified terminal capabilities. Where possible terminfo is
14       consulted to find the string to use. Some options however (marked
15       "virtual consoles only" below) do not correspond to a terminfo(5)
16       capability. In this case, if the terminal type is "con" or "linux" the
17       string that invokes the specified capabilities on the PC Minix virtual
18       console driver is output. Options that are not implemented by the
19       terminal are ignored.
20

OPTIONS

22       For boolean options (on or off), the default is on.
23
24       Below, an 8-color can be black, red, green, yellow, blue, magenta,
25       cyan, or white.
26
27       A 16-color can be an 8-color, or grey, or bright followed by red,
28       green, yellow, blue, magenta, cyan, or white.
29
30       The various color options may be set independently, at least on virtual
31       consoles, though the results of setting multiple modes (for example,
32       --underline and --half-bright) are hardware-dependent.
33
34       The optional arguments are recommended with '=' (equals sign) and not
35       space between the option and the argument. For example
36       --option=argument. setterm can interpret the next non-option argument
37       as an optional argument too.
38
39       --appcursorkeys on|off
40           Sets Cursor Key Application Mode on or off. When on, ESC O A, ESC O
41           B, etc. will be sent for the cursor keys instead of ESC [ A, ESC [
42           B, etc. See the vi and Cursor-Keys section of the
43           Text-Terminal-HOWTO for how this can cause problems for vi users.
44           Virtual consoles only.
45
46       --append console_number
47           Like --dump, but appends to the snapshot file instead of
48           overwriting it. Only works if no --dump options are given.
49
50       --background 8-color|default
51           Sets the background text color.
52
53       --blank[=0-60|force|poke]
54           Sets the interval of inactivity, in minutes, after which the screen
55           will be automatically blanked (using APM if available). Without an
56           argument, it gets the blank status (returns which vt was blanked,
57           or zero for an unblanked vt). Virtual consoles only.
58
59           The force argument keeps the screen blank even if a key is pressed.
60
61           The poke argument unblanks the screen.
62
63       --bfreq[=number]
64           Sets the bell frequency in Hertz. Without an argument, it defaults
65           to 0. Virtual consoles only.
66
67       --blength[=0-2000]
68           Sets the bell duration in milliseconds. Without an argument, it
69           defaults to 0. Virtual consoles only.
70
71       --blink on|off
72           Turns blink mode on or off. Except on a virtual console, --blink
73           off turns off all attributes (bold, half-brightness, blink,
74           reverse).
75
76       --bold on|off
77           urns bold (extra bright) mode on or off. Except on a virtual
78           console, --bold off turns off all attributes (bold,
79           half-brightness, blink, reverse).
80
81       --clear[=all|rest]
82           Without an argument or with the argument all, the entire screen is
83           cleared and the cursor is set to the home position, just like
84           clear(1) does. With the argument rest, the screen is cleared from
85           the current cursor position to the end.
86
87       --clrtabs[=tab1 tab2 tab3 ...]
88           Clears tab stops from the given horizontal cursor positions, in the
89           range 1-160. Without arguments, it clears all tab stops. Virtual
90           consoles only.
91
92       --cursor on|off
93           Turns the terminal’s cursor on or off.
94
95       --default
96           Sets the terminal’s rendering options to the default values.
97
98       --dump[=console_number]
99           Writes a snapshot of the virtual console with the given number to
100           the file specified with the --file option, overwriting its
101           contents; the default is screen.dump. Without an argument, it dumps
102           the current virtual console. This overrides --append.
103
104       --file filename
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 default
107           is screen.dump in the current directory. A path name that exceeds
108           the system maximum will be truncated, see PATH_MAX from
109           linux/limits.h for the value.
110
111       --foreground 8-color|default
112           Sets the foreground text color.
113
114       --half-bright on|off
115           Turns dim (half-brightness) mode on or off. Except on a virtual
116           console, --half-bright off turns off all attributes (bold,
117           half-brightness, blink, reverse).
118
119       --hbcolor [bright] 16-color
120           Sets the color for half-bright characters.
121
122       --initialize
123           Displays the terminal initialization string, which typically sets
124           the terminal’s rendering options, and other attributes to the
125           default values.
126
127       --inversescreen on|off
128           Swaps foreground and background colors for the whole screen.
129
130       --linewrap on|off
131           Makes the terminal continue on a new line when a line is full.
132
133       --msg on|off
134           Enables or disables the sending of kernel printk() messages to the
135           console. Virtual consoles only.
136
137       --msglevel 0-8
138           Sets the console logging level for kernel printk() messages. All
139           messages strictly more important than this will be printed, so a
140           logging level of 0 has the same effect as --msg on and a logging
141           level of 8 will print all kernel messages. klogd(8) may be a more
142           convenient interface to the logging of kernel messages.
143
144           Virtual consoles only.
145
146       --powerdown[=0-60]
147           Sets the VESA powerdown interval in minutes. Without an argument,
148           it defaults to 0 (disable powerdown). If the console is blanked or
149           the monitor is in suspend mode, then the monitor will go into vsync
150           suspend mode or powerdown mode respectively after this period of
151           time has elapsed.
152
153       --powersave mode
154           Valid values for mode are:
155
156           vsync|on
157               Puts the monitor into VESA vsync suspend mode.
158
159           hsync
160               Puts the monitor into VESA hsync suspend mode.
161
162           powerdown
163               Puts the monitor into VESA powerdown mode.
164
165           off
166               Turns monitor VESA powersaving features.
167
168       --regtabs[=1-160]
169           Clears all tab stops, then sets a regular tab stop pattern, with
170           one tab every specified number of positions. Without an argument,
171           it defaults to 8. Virtual consoles only.
172
173       --repeat on|off
174           Turns keyboard repeat on or off. Virtual consoles only.
175
176       --reset
177           Displays the terminal reset string, which typically resets the
178           terminal to its power-on state.
179
180       --resize
181           Reset terminal size by assessing maximum row and column. This is
182           useful when actual geometry and kernel terminal driver are not in
183           sync. Most notable use case is with serial consoles, that do not
184           use ioctl(3p) but just byte streams and breaks.
185
186       --reverse on|off
187           Turns reverse video mode on or off. Except on a virtual console,
188           --reverse off turns off all attributes (bold, half-brightness,
189           blink, reverse).
190
191       --store
192           Stores the terminal’s current rendering options (foreground and
193           background colors) as the values to be used at reset-to-default.
194           Virtual consoles only.
195
196       --tabs[=tab1 tab2 tab3 ...]
197           Sets tab stops at the given horizontal cursor positions, in the
198           range 1-160. Without arguments, it shows the current tab stop
199           settings.
200
201       --term terminal_name
202           Overrides the TERM environment variable.
203
204       --ulcolor [bright] 16-color
205           Sets the color for underlined characters. Virtual consoles only.
206
207       --underline on|off
208           Turns underline mode on or off.
209
210       -h, --help
211           Display help text and exit.
212
213       -V, --version
214           Print version and exit.
215

COMPATIBILITY

217       Since version 2.25 setterm has support for long options with two
218       hyphens, for example --help, beside the historical long options with a
219       single hyphen, for example -help. In scripts it is better to use the
220       backward-compatible single hyphen rather than the double hyphen.
221       Currently there are no plans nor good reasons to discontinue
222       single-hyphen compatibility.
223

BUGS

225       Differences between the Minix and Linux versions are not documented.
226

SEE ALSO

228       stty(1), tput(1), tty(4), terminfo(5)
229

REPORTING BUGS

231       For bug reports, use the issue tracker at
232       https://github.com/util-linux/util-linux/issues.
233

AVAILABILITY

235       The setterm command is part of the util-linux package which can be
236       downloaded from Linux Kernel Archive
237       <https://www.kernel.org/pub/linux/utils/util-linux/>.
238
239
240
241util-linux 2.38.1                 2022-05-11                        SETTERM(1)
Impressum