TERMINAL-COLORS.D(5)

๐ŸŒธ TERMINAL-COLORS.D โ€” the file format page, bestie edition ๐Ÿ’…

okay so this is the terminal-colors.d manual, section 5 (File formats). It's the whole vibe of how your terminal decides what's pretty and what's plain. No cap.


โœจ NAME โœจ

terminal-colors.d โ€” configure output colorization for various utilities ๐ŸŽจ


โœจ SYNOPSIS โœจ

/etc/terminal-colors.d/[name.|[name]@term.]type

โœจ DESCRIPTION โœจ

So the files chilling in this directory? They decide the default behavior for utilities when they're coloring output. That's literally their whole job.

The name is a utility name. It's optional, and when none is specified then the file is used for all unspecified utilities. she's a universal queen ๐Ÿ‘‘

The term is a terminal identifier โ€” aka the TERM environment variable. The terminal identifier is optional too, and when none is specified then the file is used for all unspecified terminals.

The type is a file type. Here are the supported file types, and yes you need to know all of them:

  • disable โ€” Turns off output colorization for all compatible utilities. Also peep the NO_COLOR environment variable below ๐Ÿ‘€
  • enable โ€” Turns on output colorization; any matching disable files are ignored.
  • scheme โ€” Specifies colors used for output. The file format may be specific to the utility, and the default format is described below.

Now here's the drama: if there are more files that match for a utility, then the file with the more specific filename wins. For example, the filename @xterm.scheme has less priority than dmesg@xterm.scheme. The lowest priority are those files without a utility name and terminal identifier (e.g., "disable"). Most specific girlie takes the crown.

And the user-specific $XDG_CONFIG_HOME/terminal-colors.d or $HOME/.config/terminal-colors.d overrides the global setting. Your personal config ate, fr fr.


๐ŸŽ€ DEFAULT SCHEME FILES FORMAT ๐ŸŽ€

The following statement is recognized:

name color-sequence

The name is a logical name for the color sequence (for example: error). The names are specific to the utilities. For more details always see the COLORS section in the man page for the utility.

The color-sequence can be a color name, an ANSI color sequence, or an escape sequence. Pick your fighter ๐Ÿ’–

๐ŸŒˆ Color names

Valid color names are: black, blink, blue, bold, brown, cyan, darkgray, gray, green, halfbright, lightblue, lightcyan, lightgray, lightgreen, lightmagenta, lightred, magenta, red, reset, reverse, and yellow.

๐ŸŒˆ ANSI color sequences

An ANSI color sequence is composed of sequences of numbers separated by semicolons. The most common codes are:

  • 0 โ€” to restore default color
  • 1 โ€” for brighter colors
  • 4 โ€” for underlined text
  • 5 โ€” for flashing text
  • 30 โ€” for black foreground
  • 31 โ€” for red foreground
  • 32 โ€” for green foreground
  • 33 โ€” for yellow (or brown) foreground
  • 34 โ€” for blue foreground
  • 35 โ€” for purple foreground
  • 36 โ€” for cyan foreground
  • 37 โ€” for white (or gray) foreground
  • 40 โ€” for black background
  • 41 โ€” for red background
  • 42 โ€” for green background
  • 43 โ€” for yellow (or brown) background
  • 44 โ€” for blue background
  • 45 โ€” for purple background
  • 46 โ€” for cyan background
  • 47 โ€” for white (or gray) background

For example, to use a red background for alert messages in the output of dmesg(1), use:

echo 'alert 37;41' >> /etc/terminal-colors.d/dmesg.scheme

slay. ๐Ÿ”ฅ

๐ŸŒˆ Escape sequences

An escape sequence is needed to enter a space, backslash, caret, or any control character anywhere in a string, as well as a hash mark as the first character. These C-style backslash-escapes can be used:

  • \a โ€” Bell (ASCII 7)
  • \b โ€” Backspace (ASCII 8)
  • \e โ€” Escape (ASCII 27)
  • \f โ€” Form feed (ASCII 12)
  • \n โ€” Newline (ASCII 10)
  • \r โ€” Carriage Return (ASCII 13)
  • \t โ€” Tab (ASCII 9)
  • \v โ€” Vertical Tab (ASCII 11)
  • \? โ€” Delete (ASCII 127)
  • \_ โ€” Space
  • \\ โ€” Backslash (\)
  • \^ โ€” Caret (^)
  • \\# โ€” Hash mark (#)

๐ŸŒˆ Comments

Lines where the first non-blank character is a # (hash) are ignored. Any other use of the hash character is not interpreted as introducing a comment. So don't get cute with it.


๐Ÿ’œ ENVIRONMENT ๐Ÿ’œ

  • TERMINAL_COLORS_DEBUG=all โ€” enables debug output.
  • NO_COLOR โ€” if defined, this disables output colorization unless explicitly enabled by a command-line option. See https://no-color.org/ for more details. Supported since util-linux version 2.41.

๐Ÿฆ‹ FILES ๐Ÿฆ‹

  • $XDG_CONFIG_HOME/terminal-colors.d
  • $HOME/.config/terminal-colors.d
  • /etc/terminal-colors.d

โญ EXAMPLES โญ

Disable colors for all compatible utilities:

touch /etc/terminal-colors.d/disable

Disable colors for all compatible utils on a vt100 terminal:

touch /etc/terminal-colors.d/@vt100.disable

Disable colors for all compatible utils except dmesg(1):

touch /etc/terminal-colors.d/disable
touch /etc/terminal-colors.d/dmesg.enable

the enable file really said "not her, she's exempt" ๐Ÿ’€


๐Ÿ‘‘ COMPATIBILITY ๐Ÿ‘‘

The terminal-colors.d functionality is currently supported by all util-linux utilities which provide colorized output. For more details always see the COLORS section in the man page for the utility.


๐Ÿ™ˆ REPORTING BUGS ๐Ÿ™ˆ

For bug reports, use the issue tracker <https://github.com/util-linux/util-linux/issues>.

bestie if something's broken, tell the maintainers, don't just suffer in silence ๐Ÿ˜ญ

๐Ÿซถ AVAILABILITY ๐Ÿซถ

terminal-colors.d is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.


and that's the whole page, bestie โ€” no skips, no cuts, every flag and every escape sequence accounted for. This one's from util-linux 2.42.4, dated 2026-09-21. go be colorful ๐ŸŽ€โœจ๐Ÿ’–

๐Ÿ“ฆ 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