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

COMPATIBILITY

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

BUGS

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

SEE ALSO

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

AVAILABILITY

230       The  setterm command is part of the util-linux package and is available
231       from Linux Kernel Archive ⟨https://www.kernel.org/pub/linux/utils/util-
232       linux/⟩.
233
234
235
236util-linux                         May 2014                         SETTERM(1)
Impressum