Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I create a message box using command-line to show a text‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌?

share|improve this question
What do you mean by "message box"? A graphic alert box, a popup message box? Something else? – polym Jul 16 '14 at 18:44
up vote 26 down vote accepted

For a standard "box around a message", use boxes:

echo 'This is a test' | boxes

boxes will look like this (First one. Second one is a custom like cowsay):

enter image description here

If you mean an alert box, use notify-send:

notify-send 'title' 'message'

notify-send looks like this:

enter image description here

You also can use zenity for a popup window:

zenity --error --text="An error occurred\!" --title="Warning\!"

Zenity is more graphical and has more options, like having the window appear as q question, using:

zenity --question --text="Do you wish to continue/?"

or even progress bars, using:

find /usr | zenity --progress --pulsate --auto-close --auto-kill --text="Working..."

zenity looks like this:

enter image description here

Or use dialog, for a command-line only message box:

dialog --checklist "Choose OS:" 15 40 5 \
1 Linux off \
2 Solaris on \
3 'HP UX' off \
4 AIX off

dialog looks like this:

enter image description here

Another option is whiptail:

whiptail --title "Example Dialog" --msgbox "This is an example of a message box. You must hit OK to continue." 8 78

whiptail looks like this:

enter image description here

And if you are truly crazy, use toilet:

toilet -F border -F gay "CRAZY"

toilet looks like this:

enter image description here

share|improve this answer

And then just because @polym's completely over the top answer missed the classic messaging:

write <username> [<terminal>] - send a message to another user. Either interactively or as part of a pipe with echo "message" | write username


And the complement to write, wall to send a message to all users


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.