SETTERM(1) | User Commands | SETTERM(1) |
NAME
setterm - set terminal attributes
SYNOPSIS
setterm [options]
DESCRIPTION
setterm writes to standard output a character string that will invoke the specified terminal capabilities. Where possible terminfo is consulted to find the string to use. Some options however (marked "virtual consoles only" below) do not correspond to a terminfo(5) capability. In this case, if the terminal type is "con" or "linux" the string that invokes the specified capabilities on the PC Minix virtual console driver is output. Options that are not implemented by the terminal are ignored.
OPTIONS
For boolean options (on or off), the default is on.
Below, an 8-color can be black, red, green, yellow, blue, magenta, cyan, or white.
A 16-color can be an 8-color, or grey, or bright followed by red, green, yellow, blue, magenta, cyan, or white.
The various color options may be set independently, at least on virtual consoles, though the results of setting multiple modes (for example, --underline and --half-bright) are hardware-dependent.
The optional arguments are recommended with '=' (equals sign) and not space between the option and the argument. For example --option=argument. setterm can interpret the next non-option argument as an optional argument too.
--appcursorkeys on|off
--append console_number
--background 8-color|default
--blank[=0-60|force|poke]
The force argument keeps the screen blank even if a key is pressed.
The poke argument unblanks the screen.
--bfreq[=number]
--blength[=0-2000]
--blink on|off
--bold on|off
--clear[=all|rest]
--clrtabs[=tab1 tab2 tab3 ...]
--cursor on|off
--default
--dump[=console_number]
--file filename
--foreground 8-color|default
--half-bright on|off
--hbcolor 16-color
--initialize
--inversescreen on|off
--linewrap on|off
--msg on|off
--msglevel 0-8
Virtual consoles only.
--powerdown[=0-60]
--powersave mode
vsync|on
hsync
powerdown
off
--regtabs[=1-160]
--repeat on|off
--reset
--resize
--reverse on|off
--store
--tabs[=tab1 tab2 tab3 ...]
--term terminal_name
--ulcolor 16-color
--underline on|off
-h, --help
-V, --version
WARNING
Use of setterm in combination with stdout redirection can have unexpected results, as some options operate on stdin. To prevent problems, always redirect both stdin and stdout to the same device.
COMPATIBILITY
Since version 2.25 setterm has support for long options with two hyphens, for example --help, beside the historical long options with a single hyphen, for example -help. In scripts it is better to use the backward-compatible single hyphen rather than the double hyphen. Currently there are no plans nor good reasons to discontinue single-hyphen compatibility.
BUGS
Differences between the Minix and Linux versions are not documented.
SEE ALSO
REPORTING BUGS
For bug reports, use the issue tracker at https://github.com/util-linux/util-linux/issues.
AVAILABILITY
The setterm command is part of the util-linux package which can be downloaded from Linux Kernel Archive https://www.kernel.org/pub/linux/utils/util-linux/.
2024-07-04 | util-linux 2.40.2 |