Skip to main content

ENQ

AI-Generated Content
This page was generated with the assistance of AI and may contain inaccuracies. It is intended as a placeholder for future human verification. If you spot issues ahead of its initial review, please report them on GitHub!
Standard

ENQ (Enquiry) is a C0 control character that requests the terminal to send an answerback string. It was originally used in communication protocols to identify the remote device.

Syntax​

ENQ       0x05
Formal syntax
ENQ = 0x05 ;

Response​

When the terminal receives ENQ, it transmits its configured answerback string back to the host. On DEC VT terminals, this string was user-configurable through the terminal's setup menu.

Description​

Per ECMA-48 §8.3.44, ENQ "is transmitted by a sender as a request for a response from a receiver."

On DEC VT100 and later terminals, receiving ENQ causes the terminal to send a pre-configured answerback message. This was used to identify terminal types in multi-terminal environments and for simple challenge-response protocols.

Modern behavior​

Most modern terminal emulators respond to ENQ with an empty string or ignore it entirely, as the answerback mechanism poses a security risk: a malicious document could embed ENQ characters to trigger the terminal to "type" the answerback string into the shell, potentially executing commands.

Some terminals (e.g., XTerm) allow configuring the answerback string but default to an empty response. The DA1 (Device Attributes) sequence is the preferred modern mechanism for terminal identification.

warning

Configuring a non-empty answerback string can be a security risk. Untrusted input displayed in the terminal could contain ENQ characters, causing the answerback string to be injected as keyboard input.

Specifications​

SpecificationSection
ECMA-48§8.3.44

Terminal support​

TerminalSupportVersionNotes
Terminal Emulators
Alacritty✗NoNo evidence of ENQ/answerback implementation found
Bobcat✓0.9.0AnswerBackMessage configurable in profiles (Terminal.cpp:370)
contour✗NoENQ (0x05) not handled; no answerback functionality found
foot✗NoNo implementation found in action_execute()
Ghostty✓v1.0.0Handled in stream.zig:766 as C0.ENQ (0x05)
iTerm2✓Yes
Kitty✗No
Konsole✓YesCalls reportAnswerBack()
mintty✓YesHandled in do_ctrl() at src/termout.c:1709-1714, sends answerback string
mlterm✗NoNo ENQ/answerback implementation found
PuTTY✓0.45Sends configurable answerback string
Rio✗NoControl code defined but not handled in execute()
rxvt-unicode✓rxvt-unicode-1.2
st✗NoExplicitly ignored (st.c:2246)
terminology✗NoNot implemented
VT100✓Yes
VTE✗NoRecognized but no-op for security reasons
WezTerm✓YesHandled in performer.rs:473 via ControlCode::Enquiry, responds with configurable answerback string
Windows Terminal✓YesHandled via EnquireAnswerback() dispatch in OutputStateMachineEngine.cpp:53-54
xterm✓YesImplemented in charproc.c:3674. Returns answerback string
xterm.js✗NoNot implemented, no handler registered
Multiplexers
cy✗NoNo handler for 0x05
GNU Screen✗NoENQ (0x05) is not handled as answerback; only used in OSC strings
tmux✗NoENQ (0x05) is ignored, in range 0x00-0x06 with NULL handler
tuios✗No
Zellij✗No

See also​