Skip to content

iTerm2

The dominant third-party macOS emulator, with a large private extension namespace under OSC 1337 and early adoption of most modern protocols.

Identity

  • TERM: xterm-256color.
  • TERM_PROGRAM: iTerm.app; TERM_PROGRAM_VERSION carries the version.
  • ITERM_SESSION_ID and ITERM_PROFILE are set.
  • LC_TERMINAL=iTerm2 and LC_TERMINAL_VERSION are forwarded over SSH when the shell integration is installed.
  • XTVERSION: ?

Documentation

Notable behavior

  • Originated OSC 1337 (inline images, SetUserVar, CurrentDir, RemoteHost, badges, annotations) and OSC 133 shell-integration marks (adopted from FinalTerm).
  • Co-originated OSC 8 hyperlinks with VTE.
  • Implements Sixel and the Kitty graphics protocol (3.5) in addition to its own image protocol.
  • Implements the Kitty keyboard protocol (3.5) and modifyOtherKeys.
  • Supports OSC 52 (governed by a preference), OSC 9 and 777 notifications, underline styles, truecolor, and synchronized output.
  • The it2* utilities and the Python API are separate channels outside TDN scope.

Version notes

3.x.y; the 3.5 series added the Kitty keyboard and graphics protocols. See the changelog for specifics.

Probe

echo "$TERM_PROGRAM_VERSION"
tools/query '\033[>0q'
tools/query '\033[?u'

Feature support

Records are maintained independently in tdn/terminals/iterm2.yaml. Unlisted features are unknown. See the comparison for all features.

FeatureSupportAs ofNotes and evidence
BEL urgency/visual
c0-bel-attention
SupportedImported · unverifiedUnversionedYes

import

14/16 pixel sizes
csi-14-16-t-pixel-sizes
SupportedImported · unverifiedUnversionedYes

import

18 size in cells
csi-18-t-text-size
SupportedImported · unverifiedUnversionedYes

import

22/23 title stack
csi-22-23-t-title-stack
SupportedImported · unverifiedUnversionedYes

import

Move/resize (3,4,8)
csi-3-4-8-t-move-resize
SupportedImported · unverifiedUnversionedYes

import

ED 3 (scrollback)
csi-3-j-erase-scrollback
SupportedImported · unverifiedUnversionedYes

import

DECRQM
csi-decrqm
SupportedImported · unverifiedUnversionedYes

import

DECSLRM / ?69
csi-decslrm
SupportedImported · unverifiedUnversionedYes

import

DECSTBM
csi-decstbm
SupportedImported · unverifiedUnversionedYes

import

DECSTR
csi-decstr
SupportedImported · unverifiedUnversionedYes

import

ED/EL/ECH/ICH/DCH/IL/DL
csi-editing-operations
SupportedImported · unverifiedUnversionedYes

import

modifyOtherKeys
csi-modify-other-keys
SupportedImported · unverifiedUnversionedYes; Preference "Report modifiers using CSI u" ([iTerm2 documentation](https://iterm2.com/documentation-preferences-profiles-keys.html).)

import

SU/SD
csi-su-sd-scroll
SupportedImported · unverifiedUnversionedYes

import

Kitty keyboard protocol
csi-u-kitty-keyboard
SupportedImported · unverifiedUnversionedYes; Since 3.5 ([iTerm2 3.5 release notes](https://iterm2.com/downloads.html).)

import

DECRQSS
dcs-decrqss
SupportedImported · unverifiedUnversionedYes; `?` which `Pt` values

import

Sixel
dcs-sixel
SupportedImported · unverifiedUnversionedYes ([iTerm2 images](https://iterm2.com/documentation-images.html).)

import

1000 mouse
dec-mode-1000-mouse
SupportedImported · unverifiedUnversionedYes

import

1002 button motion
dec-mode-1002-button-motion
SupportedImported · unverifiedUnversionedYes

import

1003 all motion
dec-mode-1003-all-motion
SupportedImported · unverifiedUnversionedYes

import

1004 focus
dec-mode-1004-focus
SupportedImported · unverifiedUnversionedYes ([iTerm2 escape codes](https://iterm2.com/documentation-escape-codes.html).)

import

1006 sgr mouse
dec-mode-1006-sgr-mouse
SupportedImported · unverifiedUnversionedYes

import

1007 alternate scroll
dec-mode-1007-alternate-scroll
SupportedImported · unverifiedUnversionedYes

import

1015 urxvt mouse
dec-mode-1015-urxvt-mouse
SupportedImported · unverifiedUnversionedYes

import

1016 pixel mouse
dec-mode-1016-pixel-mouse
SupportedImported · unverifiedUnversionedYes

import

1049 alternate screen
dec-mode-1049-alternate-screen
SupportedImported · unverifiedUnversionedYes

import

2004 bracketed paste
dec-mode-2004-bracketed-paste
SupportedImported · unverifiedUnversionedYes | Also recorded: Yes; ([iTerm2 escape codes](https://iterm2.com/documentation-escape-codes.html).)

import import

2026 synchronized output
dec-mode-2026-synchronized-output
SupportedImported · unverifiedUnversionedYes

import

2031 color scheme reports
dec-mode-2031-color-scheme-reports
SupportedImported · unverifiedUnversionedYes

import

win32-input-mode
dec-mode-9001-win32-input
UnknownImported · unverifiedUnversioned?; Not a Unix protocol; not documented by any of them

import

OSC 0/2 set
osc-0-2-title
SupportedImported · unverifiedUnversionedYes

import

OSC 10/11 query
osc-10-11-default-colors-query
SupportedImported · unverifiedUnversionedYes

import

OSC 10/11 set
osc-10-11-default-colors-set
SupportedImported · unverifiedUnversionedYes

import

104/110/111 reset
osc-104-110-111-color-reset
SupportedImported · unverifiedUnversionedYes

import

OSC 12 cursor
osc-12-cursor-color
SupportedImported · unverifiedUnversionedYes

import

OSC 133 A–D
osc-133-prompt-marks
SupportedImported · unverifiedUnversionedYes

import

OSC 1337 CurrentDir
osc-1337-current-dir
SupportedImported · unverifiedUnversionedYes

import

OSC 1337 (any)
osc-1337-family
SupportedImported · unverifiedUnversionedYes

import

iTerm2
osc-1337-inline-images
SupportedImported · unverifiedUnversionedYes ([iTerm2 images](https://iterm2.com/documentation-images.html).) | Also recorded: Yes ([iTerm2 inline images](https://iterm2.com/documentation-images.html).); Reference; multipart since 3.5

import import

OSC 1337 SetUserVar
osc-1337-set-user-var
SupportedImported · unverifiedUnversionedYes

import

OSC 4 query
osc-4-palette-query
SupportedImported · unverifiedUnversionedYes

import

OSC 4 set
osc-4-palette-set
SupportedImported · unverifiedUnversionedYes

import

OSC 52 read
osc-52-read
UnknownImported · unverifiedUnversioned?; Off by default; "Applications in terminal may access clipboard" preference

import

OSC 52 write
osc-52-write
SupportedImported · unverifiedUnversionedYes; Off by default; "Applications in terminal may access clipboard" preference

import

OSC 7
osc-7-working-directory
SupportedImported · unverifiedUnversionedYes

import

OSC 8 hyperlinks
osc-8-hyperlinks
SupportedImported · unverifiedUnversionedYes

import

OSC 9 notify
osc-9-notification
SupportedImported · unverifiedUnversionedYes

import

256 colors
sgr-256-colors
SupportedImported · unverifiedUnversionedYes

import

Italic 3
sgr-3-italic
SupportedImported · unverifiedUnversionedYes

import

Colon form 38:2
sgr-38-2-colon-form
SupportedImported · unverifiedUnversionedYes

import

Truecolor 38;2
sgr-38-2-truecolor
SupportedImported · unverifiedUnversionedYes

import

Underline styles 4:n
sgr-4-underline-styles
SupportedImported · unverifiedUnversionedYes

import

Blink 5
sgr-5-blink
SupportedImported · unverifiedUnversionedYes

import

Underline color 58
sgr-58-underline-color
SupportedImported · unverifiedUnversionedYes

import

Strikethrough 9
sgr-9-strikethrough
SupportedImported · unverifiedUnversionedYes

import

Ships its own shell scripts
shell-integration-scripts
SupportedImported · unverifiedUnversionedYes

import

bce
terminfo-bce
SupportedImported · unverifiedUnversionedYes

import

Ambiguous-width option
text-ambiguous-width
SupportedImported · unverifiedUnversionedYes ([iTerm2 preferences, Profiles > Text, "Treat ambiguous-width characters as double width"](https://iterm2.com/documentation-preferences-profiles-text.html).)

import

Bold-is-bright option
text-bold-is-bright
SupportedImported · unverifiedUnversionedYes

import

Color emoji rendering
text-color-emoji
SupportedImported · unverifiedUnversionedYes

import

Italic face
text-italic-face
SupportedImported · unverifiedUnversionedYes

import

Ligatures / shaping
text-shaping
SupportedImported · unverifiedUnversionedYes

import