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, 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. 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. ๐Ÿ’โ€โ™€๏ธ


  • --appcursorkeys on|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 of ESC [ 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. ๐Ÿ˜ญ
  • --append console_number โ€” Like --dump, but it appends to the snapshot file instead of overwriting it. Only works if no --dump options are given. Fussy, but fair. โœจ
  • --background 8-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, or zero for an unblanked vt). Virtual consoles only.
    • The force argument keeps the screen blank even if a key is pressed. Bold. Iconic. Unbothered. ๐Ÿ’…
    • The poke argument unblanks the screen. Wake up bestie, we're going out. ๐Ÿซถ
  • --bfreq[=number] โ€” Sets the bell frequency in Hertz. Without an argument, it defaults to 0. Virtual consoles only. ๐Ÿ””
  • --blength[=0-2000] โ€” Sets the bell duration in milliseconds. Without an argument, it defaults to 0. Virtual consoles only. โฑ๏ธ
  • --blink on|off โ€” Turns blink mode on or off. Except on a virtual console, --blink off turns off all attributes (bold, half-brightness, blink, reverse). It's giving "one switch, total reset." ๐Ÿ’€
  • --bold on|off โ€” Turns bold (extra bright) mode on or off. Except on a virtual console, --bold off turns off all attributes (bold, half-brightness, blink, reverse).
  • --clear[=all|rest] โ€” Without an argument or with the argument all, the entire screen is cleared and the cursor is set to the home position, just like clear(1) does. With the argument rest, 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.
  • --cursor on|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 --file option, overwriting its contents; the default is screen.dump. Without an argument, it dumps the current virtual console. This overrides --append. ๐Ÿ“ธ
  • --file filename โ€” Sets the snapshot file name for any --dump or --append options on the same command line. If this option is not present, the default is screen.dump in the current directory. A path name that exceeds the system maximum will be truncated โ€” see PATH_MAX from linux/limits.h for the value. ๐Ÿ—‚๏ธ
  • --foreground 8-color|default โ€” Sets the foreground text color. ๐ŸŽจ
  • --half-bright on|off โ€” Turns dim (half-brightness) mode on or off. Except on a virtual console, --half-bright off turns off all attributes (bold, half-brightness, blink, reverse).
  • --hbcolor 16-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. ๐Ÿงš
  • --inversescreen on|off โ€” Swaps foreground and background colors for the whole screen. Whole-screen flip, main character move. ๐Ÿ”„
  • --linewrap on|off โ€” Makes the terminal continue on a new line when a line is full. ๐Ÿ“œ
  • --msg on|off โ€” Enables or disables the sending of kernel printk() messages to the console. Virtual consoles only.
  • --msglevel 0-8 โ€” Sets the console logging level for kernel printk(9) messages. All messages strictly more important than this will be printed, so a logging level of 0 has the same effect as --msg on and a logging level of 8 will 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 to 0 (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. ๐Ÿ˜ด
  • --powersave mode โ€” 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 to 8. Virtual consoles only. ๐Ÿ“
  • --repeat on|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 use ioctl(2) but just byte streams and breaks. ๐Ÿ“
  • --reverse on|off โ€” Turns reverse video mode on or off. Except on a virtual console, --reverse off turns 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. ๐Ÿ‘€
  • --term terminal_name โ€” Overrides the TERM environment variable. ๐Ÿท๏ธ
  • --ulcolor 16-color โ€” Sets the color for underlined characters. Virtual consoles only. โœจ
  • --underline on|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