Creating a message box (msgbox) with a title

Enter the following command to create a message box with the following title:

$ dialog --title "Hello" --msgbox 'Hello world!' 6 20 

The option details are as follows:

  • --title "Hello": This will set the title of the message box to "Hello"
  • --msgbox 'Hello world!': This will set the content of the message box to "Hello world!"
  • 6: This will set the height of the message box
  • 20: This will set the width of message box:

The message box has a Hello title with content Hello World! It has a single OK button. We can use this message box to inform the user about any events or information. The user will have ...

Get Learning Linux Shell Scripting - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.