Introduction Zenity simple GUI for Bash

by Daniel Pham
Published: Updated:
This entry is part 1 of 13 in the series GUI for bash script using Zenity

In this article, I will introduce to you about zenity software – a tool that allows you to create simple GUi for bash scripts. The Zenity tool has a fairly simple command structure, and I’ll talk about those commands in later articles.

What is Zenity?

First, Zenity is a completely free cross-platform program. It allows you to create GTK + dialogs via command lines and shell scripts.

Zenity was originally developed by Sun Microsystems (I’ve read somewhere about this, probably on Wikipedia). Zenith is continuing to grow and operate with the maintainers LuisMedinas and ArxCruz.

This program can run cross platform on both Linux, Windows and Mac OSX. However, I see zenity only used on Linux is mainly. Zenity Homepage.

Introduction Zenity simple GUI for Bash
About zenity

Install zenity

Zenity is installed by default or is available in the repositories of the current standard Linux operating system.

To check program zenity have on your pc or not, you run the following command:

zenity --version

If the above command does not produce results as like this:

root@writebash ~ # zenity --version

You can install zenity on Linux through the following command.

  • For operating systems based on Debian (or Ubuntu):
sudo apt-get install zenity -y
  • For operating systems based on RedHat (or Fedora):
sudo yum install zenity -y

To display all the Zenity commands, type:

zenity --help

Create GUI for Bash, why is Zenity?

Personally, I or you will find that language Bash is not a powerful language for programming graphical user interface.

Most of the current applications written with the language are strong and flexible such as: C, Java, Python.

Why is Zenity? The answer is very simple. This is because Zenity is very simple and it fully supports Bash scripts. However, Zenity’s versatility is not as good as professional GUI design tools.


In the next article, I will talk more about each type of dialog that Zenity supports. And at the end of this series about Zenity, I will guide you to write a small program completed using Zenity and Bash.

(This is an article from my old blog that has been inactive for a long time, I don’t want to throw it away so I will keep it and hope it helps someone).

0 0 votes
Article Rating
Series NavigationNext part: Bash create calendar dialog with Zenity »»

You may also like

Notify of
Inline Feedbacks
View all comments

DevOps Lite is a personal blog specializing in technology with main topics about DevOps, DevSecOps, SRE and System Administrator. Articles are shared for free and contributed to the community.



Subscribe my Newsletter for new blog posts. Stay updated from your inbox!

© 2021-2024 – All rights reserved.

Please write sources “” when using articles from this website.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

Would love your thoughts, please comment.x

Adblock Detected

Please support us by disabling your AdBlocker extension from your browsers for our website.