SETTERM(1)
๐ SETTERM(1) โ set terminal attributes ๐
okay bestie, sit DOWN because we're about to talk about setterm, a little User Commands icon from the util-linux family. She doesn't run your terminal, she doesn't boss your terminal around โ she just writes a cute little character string to standard output that convinces your terminal to do stuff. Think of her as the group chat message that makes everyone show up. ๐
โจ SYNOPSIS โจ
setterm [options]
That's it. That's the whole vibe. Just setterm and a pile of options, like a girl with a full cart at Sephora. ๐๏ธ
๐ธ DESCRIPTION ๐ธ
So here's the tea: setterm writes to standard output a character string that invokes whatever terminal capabilities you asked for. Wherever it can, it consults terminfo to find the right string to use. Queen behavior, honestly. ๐
Some options (they're marked "virtual consoles only" down below, you'll see them) do not correspond to a terminfo(5) capability. When that happens, if your terminal type is "con" or "linux", setterm outputs the string that invokes that capability on the PC Minix virtual console. And if your terminal just straight up doesn't implement an option? It gets ignored. No drama, no error, just silence. She's not going to fight your terminal. ๐๏ธ
๐ OPTIONS ๐
Before we dive in, some ground rules, because rules are self-care:
- For boolean options (on or off), the default is on.
- An 8-color can be
black,red,green,yellow,blue,magenta,cyan, orwhite. - A 16-color can be an 8-color, or
grey, orbrightfollowed byred,green,yellow,blue,magenta,cyan, orwhite.
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. So like, your mileage may vary, queen. ๐คทโโ๏ธ
Also, the optional arguments are recommended with = (equals sign) and not a space between the option and the argument. For example --option=argument. That said, setterm can interpret the next non-option argument as an optional argument too. Flexible. ๐โโ๏ธ
--appcursorkeyson|off โ Sets Cursor Key Application Mode on or off. When it's on,ESC O A,ESC O B, etc. get sent for the cursor keys instead ofESC [ A,ESC [ B, etc. Peep the vi and Cursor-Keys section of the Text-Terminal-HOWTO for how this can cause problems for vi users. Virtual consoles only. ๐ญ--appendconsole_number โ Like--dump, but it appends to the snapshot file instead of overwriting it. Only works if no--dumpoptions are given. Fussy, but fair. โจ--background8-color|default โ Sets the background text color. ๐จ--blank[=0-60|force|poke]โ Sets the interval of inactivity, in minutes, after which the screen will be automatically blanked (using APM if available). Without an argument, it gets the blank status (returns which vt was blanked, orzerofor an unblanked vt). Virtual consoles only.- The
forceargument keeps the screen blank even if a key is pressed. Bold. Iconic. Unbothered. ๐ - The
pokeargument unblanks the screen. Wake up bestie, we're going out. ๐ซถ
- The
--bfreq[=number]โ Sets the bell frequency in Hertz. Without an argument, it defaults to0. Virtual consoles only. ๐--blength[=0-2000]โ Sets the bell duration in milliseconds. Without an argument, it defaults to0. Virtual consoles only. โฑ๏ธ--blinkon|off โ Turns blink mode on or off. Except on a virtual console,--blink offturns off all attributes (bold, half-brightness, blink, reverse). It's giving "one switch, total reset." ๐--boldon|off โ Turns bold (extra bright) mode on or off. Except on a virtual console,--bold offturns off all attributes (bold, half-brightness, blink, reverse).--clear[=all|rest]โ Without an argument or with the argumentall, the entire screen is cleared and the cursor is set to the home position, just likeclear(1)does. With the argumentrest, the screen is cleared from the current cursor position to the end. Fresh start energy. ๐--clrtabs[=tab1 tab2 tab3 ...]โ Clears tab stops from the given horizontal cursor positions, in the range 1-160. Without arguments, it clears all tab stops. Virtual consoles only.--cursoron|off โ Turns the terminal's cursor on or off. Blink blink, bestie. โจ--defaultโ Sets the terminal's rendering options to the default values. Back to factory settings, no notes. ๐--dump[=console_number]โ Writes a snapshot of the virtual console with the given number to the file specified with the--fileoption, overwriting its contents; the default isscreen.dump. Without an argument, it dumps the current virtual console. This overrides--append. ๐ธ--filefilename โ Sets the snapshot file name for any--dumpor--appendoptions on the same command line. If this option is not present, the default isscreen.dumpin the current directory. A path name that exceeds the system maximum will be truncated โ seePATH_MAXfromlinux/limits.hfor the value. ๐๏ธ--foreground8-color|default โ Sets the foreground text color. ๐จ--half-brighton|off โ Turns dim (half-brightness) mode on or off. Except on a virtual console,--half-bright offturns off all attributes (bold, half-brightness, blink, reverse).--hbcolor16-color โ Sets the color for half-bright characters. โจ--initializeโ Displays the terminal initialization string, which typically sets the terminal's rendering options, and other attributes to the default values. ๐ง--inversescreenon|off โ Swaps foreground and background colors for the whole screen. Whole-screen flip, main character move. ๐--linewrapon|off โ Makes the terminal continue on a new line when a line is full. ๐--msgon|off โ Enables or disables the sending of kernelprintk()messages to the console. Virtual consoles only.--msglevel0-8 โ Sets the console logging level for kernelprintk(9)messages. All messages strictly more important than this will be printed, so a logging level of0has the same effect as--msg onand a logging level of8will print all kernel messages.klogd(8)may be a more convenient interface to the logging of kernel messages.
Virtual consoles only.
--powerdown[=0-60]โ Sets the VESA powerdown interval in minutes. Without an argument, it defaults to0(disable powerdown). If the console is blanked or the monitor is in suspend mode, then the monitor will go into vsync suspend mode or powerdown mode respectively after this period of time has elapsed. ๐ด--powersavemode โ Valid values for mode are:vsync|onโ Puts the monitor into VESA vsync suspend mode.hsyncโ Puts the monitor into VESA hsync suspend mode.powerdownโ Puts the monitor into VESA powerdown mode.offโ Turns the monitor's powersaving features off. ๐
--regtabs[=1-160]โ Clears all tab stops, then sets a regular tab stop pattern, with one tab every specified number of positions. Without an argument, it defaults to8. Virtual consoles only. ๐--repeaton|off โ Turns keyboard repeat on or off. Virtual consoles only. โจ๏ธ--resetโ Displays the terminal reset string, which typically resets the terminal to its power-on state. Rebirth era. ๐ฆ--resizeโ Reset terminal size by assessing maximum row and column. This is useful when actual geometry and kernel terminal driver are not in sync. Most notable use case is with serial consoles, that do not useioctl(2)but just byte streams and breaks. ๐--reverseon|off โ Turns reverse video mode on or off. Except on a virtual console,--reverse offturns off all attributes (bold, half-brightness, blink, reverse).--storeโ Stores the terminal's current rendering options (foreground and background colors) as the values to be used at reset-to-default. Virtual consoles only. ๐พ--tabs[=tab1 tab2 tab3 ...]โ Sets tab stops at the given horizontal cursor positions, in the range 1-160. Without arguments, it shows the current tab stop settings. ๐--termterminal_name โ Overrides theTERMenvironment variable. ๐ท๏ธ--ulcolor16-color โ Sets the color for underlined characters. Virtual consoles only. โจ--underlineon|off โ Turns underline mode on or off. โ๏ธ--helpโ Display help text and exit. ๐--versionโ Display version and exit. ๐
โ ๏ธ 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. I'm so serious bestie, do not skip this one. ๐ญ
๐งก 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's 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. She's loyal like that. ๐ซถ
๐ BUGS ๐
Differences between the Minix and Linux versions are not documented. Mystery era, honestly. We simply do not know. ๐
๐ SEE ALSO ๐
stty(1), tput(1), tty(4), terminfo(5)
iykyk, go read those next. โจ
๐ REPORTING BUGS ๐
For bug reports, use the issue tracker <https://github.com/util-linux/util-linux/issues>. Don't be shy, they're nice. ๐
๐ 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/>. Go get your girl. ๐
and that's the whole page, bestie!! you just read the SETTERM(1) manual โ util-linux version 2.42.4, dated 2026-09-21. now go set some terminal attributes and slay ๐ โจ๐๐ฆ๐ธ
๐ฆ where this page comes from
- arch rolling: util-linux 2.42.4-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND ISC AND LGPL-2.1-or-later AND LicenseRef-PublicDomain
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms