Forrest logo
tool overview
On this page you find all important commands for the CLI tool whiptail. If the command you are looking for is missing please ask our AI.

whiptail

Whiptail is a command line utility program in Unix-like systems that enables the creation of dialog boxes for script-driven applications. It is based on the newt library and provides an interface for presenting various types of dialog boxes, such as message boxes, input boxes, menu boxes, file selection boxes, and more. Whiptail is widely used in shell scripts to interact with users and gather input or display information.

To use whiptail, developers can simply call the program in their script and specify the type of dialog box they want to display, along with any necessary parameters. The utility then takes care of rendering the dialog box and handling user interactions, making it a convenient tool for creating interactive command line applications.

Whiptail has a range of options and features to customize the appearance and functionality of the dialog boxes. Developers can control the size, title, and positioning of the boxes, as well as define buttons, checkboxes, and radio buttons for user selection. The utility also allows the use of colors and mouse events in certain environments.

One notable advantage of whiptail is its ability to run in both terminal and X Window System environments, making it versatile for various system configurations. Additionally, whiptail is lightweight and has a small footprint, making it a preferred choice for resource-constrained systems or environments where a graphical user interface is not available.

List of commands for whiptail:

  • whiptail:tldr:2953a whiptail: Display a simple message.
    $ whiptail --title "${title}" --msgbox "${message}" ${height_in_chars} ${width_in_chars}
    try on your machine
    explain this command
  • whiptail:tldr:2d4e1 whiptail: Display a boolean choice, returning the result through the exit code.
    $ whiptail --title "${title}" --yesno "${message}" ${height_in_chars} ${width_in_chars}
    try on your machine
    explain this command
  • whiptail:tldr:bb81a whiptail: Customise the text on the yes / no buttons.
    $ whiptail --title "${title}" --yes-button "${text}" --no-button "${text}" --yesno "${message}" ${height_in_chars} ${width_in_chars}
    try on your machine
    explain this command
tool overview