whiptail
Terminal dialog boxes for shell scripts
TLDR
SYNOPSIS
whiptail [--title title] [--backtitle backtitle] box-type [box-options] height width
DESCRIPTION
whiptail displays text-based dialog boxes from shell scripts, providing a user-friendly interface for input and selection. It creates ncurses-based dialogs that work in terminal environments, supporting various dialog types including messages, input boxes, menus, and progress bars.Output from input dialogs goes to stderr, requiring file descriptor redirection (3>&1 1>&2 2>&3) to capture in shell variables. Exit codes indicate user choices (0 for OK/Yes, 1 for Cancel/No).
PARAMETERS
--title title
Dialog title--backtitle text
Background title--msgbox text height width
Display message with OK button--yesno text height width
Display yes/no dialog--inputbox text height width [init]
Text input dialog--passwordbox text height width
Password input (hidden text)--menu text height width menu-height [tag item]...
Selection menu--checklist text height width list-height [tag item status]...
Multiple choice checklist--radiolist text height width list-height [tag item status]...
Radio button list--gauge text height width percent
Progress bar--yes-button text
Custom yes button label--no-button text
Custom no button label--ok-button text
Custom OK button label--cancel-button text
Custom cancel button label--defaultno
Default to No in yes/no dialogs--nocancel
Suppress the Cancel button--separate-output
Output checklist results one per line--scrolltext
Force display of a vertical scrollbar--topleft
Place dialog in the top-left corner--clear
Clear the screen on exit--fullbuttons
Use full-width buttons instead of compact--output-fd FD
Direct output to given file descriptor instead of stderr--textbox file height width
Display contents of a file in a scrollable box--infobox text height width
Display message without waiting for input
CAVEATS
Dialog dimensions must be specified in characters and should fit the terminal. Results go to stderr, requiring fd redirection for capture. A lightweight alternative to dialog with fewer features but smaller dependencies.
HISTORY
Created as a lightweight, newt-based reimplementation of the dialog utility. Part of the newt library developed by Red Hat. Commonly used in Debian installer and system configuration scripts due to its small footprint.
