dialog
text-mode dialog boxes for shell scripts
TLDR
SYNOPSIS
dialog [options] box-type [box-options]
DESCRIPTION
dialog displays dialog boxes from shell scripts, providing a user-friendly text-based interface for interactive scripts. It supports various widget types including message boxes, input boxes, menus, checklists, radio lists, progress bars, and file selection dialogs.The program uses the ncurses library to create pseudo-graphical interfaces in text terminals. This enables shell scripts to present professional-looking user interfaces without requiring a graphical environment.Output is written to stderr (or a specified file), while exit status indicates which button was pressed (0 for OK/Yes, 1 for Cancel/No, 255 for ESC). This design allows scripts to capture both user selections and continue using stdout for other purposes. dialog is widely used in system administration scripts, installation programs, and configuration utilities.
PARAMETERS
--msgbox text height width
Display message with OK button--yesno text height width
Yes/No question dialog--inputbox text height width [init]
Text input dialog--menu text height width menu-height tag item...
Menu selection--checklist text height width list-height tag item status...
Checkbox selection--radiolist text height width list-height tag item status...
Radio button selection (single choice)--gauge text height width percent
Progress bar display--passwordbox text height width
Password input (hidden characters)--fselect filepath height width
File selection dialog--calendar text height width day month year
Calendar date selection--title title
Set dialog title--backtitle title
Set background title at top of screen--clear
Clear screen on exit--colors
Enable embedded color codes in dialog text--output-fd fd
Output to specified file descriptor instead of stderr
CAVEATS
Output goes to stderr by default; redirect with 2>file. Exit status: 0=OK/Yes, 1=Cancel/No, 255=ESC. For graphical dialogs, see zenity or kdialog.
HISTORY
dialog was originally written by Savio Lam in 1994 and has been maintained by Thomas E. Dickey since 1999. It is based on the ncurses library and has become the standard tool for creating text-mode user interfaces in shell scripts, widely used in Linux distribution installers and configuration tools.
