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  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

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

COMPATIBILITY

206       Since  version  2.25  setterm  has  support  for  long options with two
207       hyphens, for example --help, beside the historical long options with  a
208       single  hyphen,  for example -help.  In scripts it is better to use the
209       backward-compatible single hyphen rather than the double hyphen.   Cur‐
210       rently there are no plans nor good reasons to discontinue single-hyphen
211       compatibility.
212

SEE ALSO

214       stty(1), tput(1), tty(4), terminfo(5)
215

BUGS

217       Differences between the Minix and Linux versions are not documented.
218

AVAILABILITY

220       The setterm command is part of the util-linux package and is  available
221       from Linux Kernel Archive ⟨https://www.kernel.org/pub/linux/utils/util-
222       linux/⟩.
223
224
225
226util-linux                         May 2014                         SETTERM(1)
Impressum