The dialog package is a nifty little tool that was originally created by Savio Lam and is currently maintained by Thomas E. Dickey. This package actually recreates standard Windows dialog boxes in a text environment using ANSI escape control codes. These dialog boxes can be easily incorporated into your shell scripts to interact with your script users.
The dialog package isn't installed in all Linux distributions by default, but it's almost always included in the software repository. For Ubuntu Linux, the following command can be used to install the package.
sudo apt-get install dialog
It installs the dialog package plus the required libraries for the system.
The format for the box options is as follows

There are many dialog widgets. Among them, a few of them are:
Dialog widgets
1. Calendar - Provides a calendar to display the selected date
The format for this widget is
--calendar <text> <height> <width> <day> <month> <year>
The command which we wrote in the script file is
dialog --calendar 'calendar' 5 50 30 6 2021
calendar widget
After running the script, we get the calendar as shown below.

2. Checklist - Displays multiple entries where each entry can be turned on or off.
The format for this widget is
--checklist <text> <height> <width> <list height> <tag1> <item1> <status1>...
The command which we wrote in the script file is
dialog --checklist 'checklist' 15 10 10 'apple' 5 'on' 'banana' 2 'off' 'coco' 3 'on' 'delta' 4 'off'
checklist widget
After running the script, we get the checklist as shown below.

3. Form - This allows you to build a form with labels and text fields to be filled out.
The format for this widget is
--form <text> <height> <width> <form height> <label1> <l_y1> <l_x1> <item1> <i_y1> <i_x1> <flen1> <ilen1> ...
Here, flen is the length of the field, and ilen is the length of the field that allows input to move between fields.
The command which we wrote in the script file is
dialog --form "Please enter the information" 12 40 4 "Name :" 1 1 "" 1 12 15 0 "Age: " 2 1 "" 2 12 15 0 "Mail id:" 3 1 "" 3 12 15 0
Form widget
After running the script, we get the form as shown below.

4. Gauge - Allows you to display the gauge progress window
The format for this widget is
--gauge <text> <height> <width> [<percent>]
The command which we wrote in the script file is
dialog --gauge "progress.." 10 20 40
gauge widget
After running the script, we get the window as shown below.

5. Message box - Displays a message and requires the user to select an OK button
The format for this widget is
-- msgbox <text> <height> <width>
The command which we wrote in the script file is
dialog --msgbox "This is a message" 10 25
message box widget
After running the script, we get the message box as shown below.

6. Fselect - Provides a file selection window to browse for a file.
The format for this widget is
-- fselect <filepath> <height> < width >
The command which we wrote in the script file is
dialog --title "fselect" --fselect /documents 15 40
fselect widget
After running the script, we get the window as shown below.

7. Infobox - Displays a message without waiting for a response.
The format for this widget is
--infobox <text> <height> <width>
The command which we wrote in the script file is
dialog --infobox "This is a message" 15 30
inforbox widget
After running the script, we get the information box as shown below.

8. Inputbox - Displays a single text form box for text entry.
The format for this widget is
--inputbox <text> <height> <width> [<init>]
The command which we wrote in the script file is
dialog --inputbox "Enter the name" 15 30 'enter here'
inputbox widget
After running the script, we get the input box as shown below.

9. Inputmenu - This widget provides an editable menu.
The format for this widget is
--inputmenu <text> <height> <width> <menu height> <tag1> <item1>...
The command which we wrote in the script file is
dialog --inputmenu "Edit if necessary" 12 45 25 1 "hello" 2 "good morning" 3 " take care "
inputmenu widget
After running the script, we get the window to edit as shown below.

10. Menu - This widget displays a list of selections from which to choose.
The format for this widget is
--menu <text> <height> <width> <menu height> <tag1> <item1>...
The command which we wrote in the script file is
dialog --menu "Choose the option" 12 45 25 1 "apple" 2 "banana" 3 "mango"
menu widget
After running the script, we get the window to edit as shown below.

11. Pause - It displays a meter showing the status of a specified pause period.
The format for this widget is
--pause <text> <height> <width> <seconds>
The command which we wrote in the script file is
dialog --pause "pause" 20 40 30
Pause widget
After running the script, we get the window as shown below.

The timer starts running..... out of which two images are depicted below


12. Mixed form - This widget allows you to build a form with labels and text fields of different forms to be filled out.
The format for this widget is
--mixedform <text> <height> <width> <form height> <label1> <l_y1> <l_x1> <item1> <i_y1> <i_x1> <flen1> <ilen1> <itype>...
The command which we wrote in the script file is
dialog --mixedform "Please enter the information" 12 40 4 "Name :" 1 1 "" 1 12 15 0 a "Age: " 2 1 "" 2 12 15 0 a "Mail id:" 3 1 "" 3 12 15 0 a
Mixed form widget
After running the script, we get the form as shown below.

13. Mixedgauge - allows you to display the gauge progress window with multiple items.
The format for this widget is
--mixedgauge <text> <height> <width> <percent> <tag1> <item1>...
The command which we wrote in the script file is
dialog --mixedgauge "Gauge box" 10 20 40 app one
Mixedgauge widget
After running the script, we get the window as shown below.

14. Password - This widget displays a single textbox that hides entered text.
The format for this widget is
--passwordbox <text> <height> <width> [<init>]
The command which we wrote in the script file is
dialog --passwordbox "Password" 10 20
Password widget
After running the script, we get the window as shown below.

15. Passwordform - This widget displays a form with labels and hidden text fields.
The format for this widget is
--passwordform <text> <height> <width> <form height> <label1> <l_y1> <l_x1> <item1> <i_y1> <i_x1> <flen1> <ilen1>...
The command which we wrote in the script file is
dialog --passwordform "Please enter the information" 12 40 4 "Password:" 1 1 "" 1 12 15 0 "otp: " 2 1 "" 2 12 15 0 "secret key:" 3 1 "" 3 12 15 0
Passwordform widget
After running the script, we get the window as shown below.

16. Radiolist - This widget provides a group of menu items where only one item can be selected.
The format for this widget is
--radiolist <text> <height> <width> <list height> <tag1> <item1> <status1>...
The command which we wrote in the script file is
dialog --radiolist 'radiolist' 15 10 10 'apple' 5 'off' 'banana' 2 'off' 'coffee' 3 'off' 'dessert' 4 'off'
Radiolist widget
After running the script, we get the window as shown below.

17. Program box - This widget lets you display the output of the command in the dialog box.
The format for this widget is
--prgbox <text> <command> <height> <width>
The command which we wrote in the script file is
dialog --prgbox "command" "ls" 10 30
Program box widget
After running the script, we get the window as shown below.

18. Textbox - This widget displays the contents of a file in a scroll window
The format for this widget is
--textbox <file> <height> <width>
The command which we wrote in the script file is
dialog --textbox /etc/hosts 10 60
Textbox widget
After running the script, we get the window as shown below.

19. Tailbox - This widget displays text from a file in a scroll window using the tail command.
The format for this widget is
--tailbox <file> <height> <width>
The command which we wrote in the script file is
dialog --tailbox /etc/hosts 10 60
tailbox widget
After running the script, we get the window as shown below.

20. Yes no - This widget provides a simple message with Yes and No buttons.
The format for this widget is
--yesno <text> <height> <width>
The command which we wrote in the script file is
dialog --yesno "Do you want run the command" 10 30
yesno widgetimage widget
After running the script, we get the window as shown below.

Similar Reads
Linux Commands Cheat Sheet Linux, often associated with being a complex operating system primarily used by developers, may not necessarily fit that description entirely. While it can initially appear challenging for beginners, once you immerse yourself in the Linux world, you may find it difficult to return to your previous W
13 min read
grep command in Unix/Linux The grep command in Unix/Linux is a powerful tool used for searching and manipulating text patterns within files. Its name is derived from the ed (editor) command g/re/p (globally search for a regular expression and print matching lines), which reflects its core functionality. grep is widely used by
7 min read
Linux/Unix Tutorial Linux is one of the most widely used open-source operating systems. It's fast, secure, stable, and powers everything from smartphones and servers to cloud platforms and IoT devices. Linux is especially popular among developers, system administrators, and DevOps professionals.Linux is:A Unix-like OS
10 min read
25 Basic Linux Commands For Beginners [2025] While performing a task, we all need shortcuts. Shortcuts help us to complete a task quickly. Linux comes with such commands which are one to two words, using that commands, you can perform several operations in no time. As a beginner, you must be aware of those basic Linux commands to complete an o
13 min read
Sed Command in Linux/Unix With Examples The SED command is one of the most powerful commands used during the process of text processing in Linux/Unix operating systems. The SED command is typically invoked for executing operations such as replace and search, text manipulation, and stream editing.With SED, you can manipulate text files wit
9 min read
AWK command in Unix/Linux with examples Awk is a scripting language used for manipulating data and generating reports. The awk command programming language requires no compiling and allows the user to use variables, numeric functions, string functions, and logical operators. Awk is a utility that enables a programmer to write tiny but eff
8 min read
How to Find a File in Linux | Find Command The find command in Linux is used to search for files and directories based on name, type, size, date, or other conditions. It scans the specified directory and its sub directories to locate files matching the given criteria.find command uses are:Search based on modification time (e.g., files edited
9 min read
Introduction to Linux Shell and Shell Scripting If we are using any major operating system, we are indirectly interacting with the shell. While running Ubuntu, Linux Mint, or any other Linux distribution, we are interacting with the shell by using the terminal. In this article we will discuss Linux shells and shell scripting so before understandi
8 min read
ZIP command in Linux with examples In Linux, the zip command compresses one or more files or directories into a single.zip archive file. This saves disk space, keeps data organized, and makes it simple to share or backup files. It's among the most used compression utilities, particularly when sharing large files via email or storing
6 min read
screen command in Linux with Examples The screen command is an advanced terminal multiplexer that allows you to have multiple sessions within one terminal window. It's like having "tabs" in your Linux terminal â you can open, detach, switch, or resume sessions at any time without losing what you're working on. It's particularly convenie
7 min read