This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed. Find sources: "Text-based user interface" – news ·newspapers ·books ·scholar ·JSTOR(September 2014) (Learn how and when to remove this message) |


Incomputing,text-based user interfaces (TUI) (alternatelyterminal user interfaces, to reflect a dependence upon the properties ofcomputer terminals and not just text), is aretronym describing a type ofuser interface (UI) common as an early form ofhuman–computer interaction, before the advent of bitmapped displays and modern conventionalgraphical user interfaces (GUIs). Like modern GUIs, they can use the entirescreen area and may acceptmouse and other inputs. They may also use color and often structure the display usingbox-drawing characters such as ┌ and ╣. The modern context of use is usually aterminal emulator.
In the early years of computing, text terminals were usually keyboard/printer devices. Currently, however, keyboard/display devices dominate.
A text screen (and communications with it) can belong to one of three types (here ordered in order of decreasing accessibility):
Fromtext application's point of view, the display type is determined by the API, e.g.,curses,TPUT.
UnderLinux and otherUnix-like systems, a program easilyaccommodates to any of the three cases because the same interface (namely,standard streams) controls the display and keyboard. Seebelow for comparison to Windows.
ManyTUI programming libraries are available to help developers buildTUI applications.
American National Standards Institute (ANSI) standardANSI X3.64 defines a standard set ofescape sequences that can be used to drive terminals to create TUIs (seeANSI escape code). Escape sequences may be supported for all three cases mentioned in the above section, allowing arbitrarycursor movements and color changes.However, not all terminals follow this standard, and many non-compatible but functionally equivalent sequences exist.

OnIBM Personal Computers andcompatibles, the Basic Input Output System (BIOS) andDOS system calls provide a way to write text on the screen, and theANSI.SYS driver could process standard ANSI escape sequences. However, programmers soon learned that writing data directly to thescreen buffer was far faster and simpler to program, and less error-prone; seeVGA-compatible text mode for details. This change in programming methods resulted in many DOS TUI programs.TheWindows console environment is notorious for its emulation of certain EGA/VGA text mode features, particularly random access to the text buffer, even if the application runs in a window. On the other hand, programs running under Windows (both native and DOS applications) have much less control of the display and keyboard than Linux and DOS programs can have, because of aforementioned Windows console layer.

Most often those programs used a blue background for the main screen, with white or yellow characters, although commonly they had also user color customization. They often usedbox-drawing characters in IBM'scode page 437. Later, the interface became deeply influenced bygraphical user interfaces (GUI), addingpull-down menus, overlappingwindows,dialog boxes andGUI widgets operated bymnemonics orkeyboard shortcuts. Soonmouse input was added – either at text resolution as a simple colored box or at graphical resolution thanks to the ability of theEnhanced Graphics Adapter (EGA) andVideo Graphics Array (VGA) display adapters toredefine the text character shapes by software – providing additional functions.
Some notable programs of this kind wereMicrosoft Word,DOS Shell,WordPerfect,Norton Commander,Turbo Vision basedBorlandTurbo Pascal andTurbo C (the latter included theconiolibrary),Lotus 1-2-3 and many others. Some of these interfaces survived even during theMicrosoftWindows 3.1x period in the early 1990s. For example, theMicrosoft C 6.0 compiler, used to write true GUI programs under16-bit Windows, still has its own TUI.
Since its start,Microsoft Windows includes a console to display DOS software. Later versions added theWindows console as a native interface forcommand-line interface and TUI programs. The console usually opens in window mode, but it can be switched to full, true text mode screen and vice versa by pressing theAlt andEnter keys together. Full-screen mode is not available in Windows Vista and later, but may be used with some workarounds.[1]
Windows Terminal is amulti-tabbedterminal emulator thatMicrosoft has developed forWindows 10 and later[2] as a replacement forWindows Console.
TheWindows Subsystem for Linux which was added to Windows byMicrosoft in 2019, supports runningLinux text-based apps on Windows, withinWindows console,Windows Terminal, and other Windows-based terminals.


InUnix-like operating systems, TUIs are often constructed using the terminal controllibrarycurses, orncurses (a mostly compatible library), or the alternativeS-Lang library. The advent of thecurses library withBerkeley Unix created a portable and stable API for which to write TUIs. The ability to talk to varioustext terminal types using the sameinterfaces led to more widespread use of "visual" Unix programs, which occupied the entire terminal screen instead of using a simple line interface. This can be seen intext editors such asvi,mail clients such aspine ormutt, system management tools such asSMIT,SAM,FreeBSD'sSysinstall andweb browsers such aslynx. Some applications, such asw3m, and older versions of pine andvi use the less-abletermcap library, performing many of the functions associated withcurses within the application. Custom TUI applications based onwidgets can be easily developed using thedialog program (based onncurses), or theWhiptail program (based onS-Lang).
In addition, the rise in popularity ofLinux brought many former DOS users to a Unix-like platform, which has fostered a DOS influence in many TUIs. The programminicom, for example, is modeled after the popular DOS programTelix. Some other TUI programs, such as theTwin desktop, wereported over.
Most Unix-like operating systems (Linux, FreeBSD, etc.) supportvirtual consoles, typically accessed through a Ctrl-Alt-F key combination. For example, under Linux up to 64 consoles may be accessed (12 via function keys), each displaying in full-screen text mode.
Thefree software programGNU Screen provides for managing multiple sessions inside a single TUI, and so can be thought of as being like awindow manager for text-mode and command-line interfaces.Tmux can also do this.
The proprietarymacOStext editorBBEdit includes ashell worksheet function that works as a full-screen shell window. ThefreeEmacs text editor can run a shell inside of one of its buffers to provide similar functionality. There are several shell implementations in Emacs, but onlyansi-term is suitable for running TUI programs. The other common shell modes,shell andeshell only emulate command lines and TUI programs will complain "Terminal is not fully functional" or display a garbled interface. ThefreeVim andNeovim text editors have terminal windows (simulatingxterm). The feature is intended for running jobs, parallel builds, or tests, but can also be used (with window splits and tab pages) as a lightweight terminal multiplexer.
VAX/VMS (later known asOpenVMS) had a similar facility tocurses known as the Screen Management facility or SMG. This could be invoked from the command line or called from programs using the SMG$ library.[3]
Another kind of TUI is the primary interface of theOberon operating system, first released in 1988 and still maintained. Unlike most other text-based user interfaces, Oberon does not use a text-mode console or terminal, but requires a large bit-mapped display, on which text is the primary target for mouse clicks. Analogous to alink inhypertext, a command has the formatModule.Procedureparameters ~ and is activated with a mouse middle-click. Text displayed anywhere on the screen can be edited, and if formatted with the required command syntax, can be middle-clicked and executed. Any text file containing suitably-formatted commands can be used as a so-calledtool text, thus serving as a user-configurable menu. Even the output of a previous command can be edited and used as a new command. This approach is radically different from both conventional dialogue-oriented console menus orcommand-line interfaces but bears some similarities to the worksheet interface of theMacintosh Programmer's Workshop.
Since it does not use graphicalwidgets, only plain text, but offers comparable functionality to aGUI with atiling window manager, it is referred to as a Text User Interface or TUI. For a short introduction, see the 2nd paragraph on page four of the first publishedReport on the Oberon System.[4]
Oberon'sUI influenced the design of theAcme text editor and email client for thePlan 9 from Bell Labs operating system.

Modernembedded systems are capable of displaying TUI on a monitor like personal computers. This functionality is usually implemented using specialized integrated circuits, modules, or usingFPGA.
Video circuits or modules are usually controlled usingVT100-compatible command set overUART,[citation needed] FPGA designs usually allow direct video memory access.[citation needed]