Linux console (fbcon) — ANSI escape code support
The Linux console (commonly called "fbcon" after its framebuffer console driver) is the in-kernel text terminal that runs on every Linux system before — and sometimes instead of — a graphical session. It is what you get on Ctrl+Alt+F2 on a desktop machine, on an embedded board with no Xorg / Wayland, on a Raspberry Pi headless setup, on rescue boots, on installers, and on the recovery console after a graphical session crashes. The escape-sequence dialect is documented in `console_codes(4)` and the canonical terminfo entry is `linux` / `linux-16color`.
For ANSI escape compatibility, the Linux console is a deliberately minimal VT subset: 16 colors only (8 SGR foreground + 8 SGR background, with bold-as-bright the only intensity), no italic (the kernel has no italic glyph renderer in framebuffer mode), no OSC 8 hyperlinks, no Sixel, no kitty graphics, no 256-color, no 24-bit truecolor — `tput colors` returns 8 or 16. Mouse, bracketed paste, and most DEC private modes are likewise absent. What works: SGR 0–37 / 40–47 / 1 / 4 / 7 (reset, basic FG/BG, bold, underline, reverse), cursor movement (CUP / CUF / CUB / CUU / CUD), erase (ED / EL), alt-screen, and the alt-screen-friendly `\ec` full reset (RIS).
Last updated
Feature support
How this terminal scores against the 15 features tracked in the site-wide support matrix. Click any feature name to see the full row across every terminal.
- 8 basic colors (30–37 / 40–47)SGR 30–37 foreground, 40–47 background.yes
- Bright (aixterm) colors (90–97 / 100–107)aixterm SGR extension.yes
- 256-color palette (38;5;n / 48;5;n)xterm 256-color extension.no
- 24-bit truecolor (38;2;r;g;b)16.7M direct RGB. Set $COLORTERM=truecolor.no
- Italic (SGR 3)Italic text attribute.no
- Styled underlines (4:1–4:5)Curly/dotted/dashed underline styles.no
- Strikethrough (SGR 9)Horizontal line through text.no
- OSC 8 hyperlinksInline clickable URIs.no
- Alt screen (?1049h)Full-screen app buffer.yes
- Mouse tracking (SGR ?1006)Mouse click/drag events.partial
- Bracketed paste (?2004)Pasted text wrapped in ESC[200~/ESC[201~.no
- Focus events (?1004)ESC[I on focus in, ESC[O on focus out.no
- Sixel graphicsDEC sixel inline raster images.no
- Kitty graphics protocolPNG/RGB inline images, animations.no
- Synchronized output (?2026)Atomic frame updates to avoid tearing.no
Sequences that work here
Canonical reference pages for the escape sequences this terminal handles cleanly. Each links to a full page with byte forms, citations, and per-language examples.
- SGR 0 — Reset / Normal
\x1b[0mClear all text attributes and colors back to the terminal default.
- SGR 30–37 — Foreground color (8 basic)
\x1b[31m (red, similarly 30–37)Set foreground to one of black/red/green/yellow/blue/magenta/cyan/white.
- SGR 1 — Bold / Increased intensity
\x1b[1mRender following text in bold (or bright on some terminals).
- CUP — Set cursor position
\x1b[row;colHMove the cursor to absolute row/column (1-indexed).
- ED — Erase in display (\x1b[2J clear screen)
\x1b[NJErase part or all of the screen.
Quirks & version notes
Per-terminal caveats you'll want to know before relying on a sequence in production.
- 16 colors only — bold-as-bright is the only intensity
- The Linux console's palette is fixed at 16 entries (8 normal + 8 bright). SGR 38;5;N (256-color) and SGR 38;2;r;g;b (24-bit truecolor) are silently truncated to the nearest of those 16. `bold` (SGR 1) renders by switching to the bright variant of the current FG, not by changing weight — there's no bold glyph file in framebuffer mode. If you need to render in color from a script that detects the terminal, gate truecolor on `$COLORTERM=truecolor` and 256-color on `$TERM` containing `256color`; the Linux console sets neither.
- No italic — kernel has no italic glyph in framebuffer mode
- SGR 3 (italic) is parsed but has no visible effect — the kernel's framebuffer console only ships normal + bold glyphs from the PSF/PSF2 console fonts loaded via `setfont`. neovim, less, man, and any tool that emphasizes prose via italics displays plain text instead. The terminfo entry `linux` advertises `sitm` / `ritm` as no-ops. Workaround: install kmscon (userspace KMS-based replacement console) which supports italic via FreeType — but kmscon is unmaintained and most distros don't ship it.
- No mouse, no bracketed paste, no OSC 8 — text-only design
- DECSET 1000-series mouse modes (X10 / SGR-encoded / urxvt-encoded) print as raw bytes; bracketed paste mode (DECSET 2004) is silently ignored — paste through gpm + screen / tmux if you need it; OSC 8 hyperlinks (`\e]8;;url\e\\…\e]8;;\e\\`) print the URL inline as text. The console is intentionally text-only; pointer + clipboard + hyperlink semantics live one level up (in a graphical terminal). DA1 reply (`CSI c`) is `\e[?6c` — a VT102 advertisement, not VT220+.
- Unicode works — but glyphs cap at what setfont loaded
- The Linux console handles UTF-8 input + output at the byte level since kernel 2.6, but the actual rendered glyph set is whatever's in the active PSF/PSF2 console font (typically 256 or 512 glyphs — `LatGrkCyr-8x16` from `console-setup`, for example). Code points outside the font render as a `□`-style fallback. Wide-char East-Asian glyphs are particularly poorly supported — for CJK on bare console, distros recommend `fbterm` or `kmscon`. `console_codes(4)` documents the exact mapping from Unicode to the font slot via `loadunimap`.