1SETTERM(1)                 Linux Programmer's Manual                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       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|force|poke] (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, gets the blank status (returns which vt was
132              blanked or zero for unblanked vt).
133
134              The force option keeps screen blank even if a key is pressed.
135
136              The poke option unblank the screen.
137
138       -dump [1-NR_CONS]
139              Writes a snapshot of the given virtual console (with attributes)
140              to  the file specified in the -file option, overwriting its con‐
141              tents; the default is screen.dump.  Without an  argument,  dumps
142              the current virtual console.  Overrides -append.
143
144       -append [1-NR_CONS]
145              Like  -dump,  but  appends to the snapshot file instead of over‐
146              writing it.  Only works if no -dump options are given.
147
148       -file dumpfilename
149              Sets the snapshot file name for any -dump or -append options  on
150              the  same  command  line.   If  this  option is not present, the
151              default is screen.dump in the current directory.
152
153       -msg [on|off] (virtual consoles only)
154              Enables or disables the sending of kernel printk()  messages  to
155              the console.
156
157       -msglevel 1-8 (virtual consoles only)
158              Sets  the  console  logging  level for kernel printk() messages.
159              All messages strictly more important than this will be  printed,
160              so  a  logging  level  of 0 has the same effect as -msg on and a
161              logging level of 8 will print all kernel messages.  klogd(8) may
162              be  a  more  convenient  interface to the logging of kernel mes‐
163              sages.
164
165       -powersave on|vsync
166              Puts the monitor into VESA vsync suspend mode.
167
168       -powersave hsync
169              Puts the monitor into VESA hsync suspend mode.
170
171       -powersave powerdown
172              Puts the monitor into VESA powerdown mode.
173
174       -powersave [off]
175              Turns off monitor VESA powersaving features.
176
177       -powerdown [0-60]
178              Sets the VESA powerdown interval in minutes.  Without  an  argu‐
179              ment,  defaults  to  0  (disable  powerdown).  If the console is
180              blanked or the monitor is in suspend mode, then the monitor will
181              go  into vsync suspend mode or powerdown mode respectively after
182              this period of time has elapsed.
183
184       -blength [0-2000]
185              Sets the bell duration in milliseconds.   Without  an  argument,
186              defaults to 0.
187
188       -bfreq [freqnumber]
189              Sets the bell frequency in Hz.  Without an argument, defaults to
190              0.
191

SEE ALSO

193       tput(1), stty(1), terminfo(5), tty(4)
194

BUGS

196       Differences between the Minix and Linux versions are not documented.
197

AVAILABILITY

199       The setterm command is part of the util-linux-ng package and is  avail‐
200       able from ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.
201
202
203
204Util-Linux 2.10                 7 January 2000                      SETTERM(1)
Impressum