How to draw flowchart or diagram on Linux

There are several well-known commercial flowchart and diagram software available, e.g., Visio on Windows, OmniGraffle on MacOS X. Then what about Linux? In fact, there are a couple of reasonably good Linux alternatives to Visio or OmniGraffle, for example, yEd, Dia, LibreOffice Draw, Pencil Project, etc.

In this tutorial, I will describe how to create flowchart or diagram with yEd graph editor on Linux.

yEd is an extremely easy-to-use, yet feature-rich diagram editor written in Java. Using yEd, you can create flowcharts, BPMN/UML diagrams, organizational charts, or any kind of graphs containing nodes and edges. It also features many sophisticated layout generation algorithms built-in, which allow you to test alternative layouts of created diagrams or graphs with a single button click.

Install yEd on Linux

yEd is a standalone Java application whose JAR file is freely downloadable from its website. So you can run yEd on any platform which has Java Run Time (JRE) installed. Assuming that you downloaded yEd zip file and have JRE installed on your Linux, you can install yEd as follows.

$ sudo unzip -d /opt

Then create a script named yed in /usr/bin directory, which launches JVM as shown below.

$ sudo vi /usr/bin/yed
java -jar /opt/yed-3.11.1/yed.jar

Next, make the script executable.

$ sudo chmod +x /usr/bin/yed

Now you can launch yEd editor simply by running the script as follows.

$ yed

If you want, you can also create a desktop shortcut for yEd with the following information.

  • Name: yEd
  • Command: java -jar /opt/yed-3.11.1/yed.jar
  • Icon: /opt/yed-3.11.1/icons/yicon32.png

Once you launch yEd, you will see an initial yEd window where you can create or open a yEd document file.

Draw a Diagram with yEd

yEd allows you to create any kind of diagram in a snap. You will see a "palette" window in the right sidebar, which shows a variety of nodes and edges to choose from. For example, I created the following network diagram in less than ten minutes.

Once you create a diagram, you can try yEd's built-in layout algorithms to automatically transform the diagram into different layouts. For example, I tried regenerating the original layout as follows.

Layout #1: Edge routing - orthogonal bus style

Layout #2: Edge routing - orthogonal channel

Layout #3: Circular

Draw a Flowchart with yEd

Besides diagrams, you can also draw flowcharts as easily. For example:

Once you create a flowchart, you can also explore various flowchart layouts. For example, you can change the orientation of the flowchart from vertical to horizontal as follows.

Draw a Generic Graph with yEd

yEd has built-in templates for various graph types: grid, tree, planar and random graphs. For example, if you want to generate a tree graph, you can instantly create one by entering the number of nodes, fan out, and tree depth as follows.

Among a number of other features, yEd has automatic grouping feature, where you can group individual components in automatic fashions. This is convenient when you are dealing with so many different components in your diagram.

Once you are done with editing a flowchart or diagram, you can save it to a file. By default, yEd saves a current layout in GraphML format which is an XML-based textual file format for graphs. So you can manually edit or version control yEd files easily. If you want, you can export it to various image formats including png, jpg, gif, eps, pdf and svg.

Subscribe to Xmodulo

Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.

Support Xmodulo

Did you find this tutorial helpful? Then please be generous and support Xmodulo!

The following two tabs change content below.
Dan Nanni is the founder and also a regular contributor of He is a Linux/FOSS enthusiast who loves to get his hands dirty with his Linux box. He likes to procrastinate when he is supposed to be busy and productive. When he is otherwise free, he likes to watch movies and shop for the coolest gadgets.

17 thoughts on “How to draw flowchart or diagram on Linux

  1. Looks way better for diagrams than inkscape, dia, or dot.

    no mention of its license, even on its own site?

  2. /Dia/ was one of the pioneers. Nowadays I would go for LibreOffice or Calligra. Nice one though :)

  3. Graphviz is a generator. You can program a certain layout if you want. The whole idea is to discard manual editing. It is a great tool I use to generate call graphs, CMDB diagrams, etc. It's easy to interface. I rarely need Dia. yEd isn't FOSS and I don't particularly like Java programs.

  4. I would like read a tutorial about automatic flow charts generation from the code of a C function. Maybe it could be done with Graphviz.

  5. To create diagrams you can use Dia. It's simple and powerful. To create more advance flowcharts I use PlantUML, but it's more for programmers.

  6. I'm pulling for the Libre developers to make Draw the leader, not just an alternative. I already prefer Draw to Visio. Well, I'm also pulling for FreeCAD to stomp Autodesk into dust.

  7. Timelines? I keep needing to write timeline type graphs. Anybody got a magic tool in Linux for that? I'm actually all for describing them via a text file with graphviz, which is really nice looking, because I often will spend a lot of time in Visio making up a graph, only to have to manually retweak it later.

  8. This is awesome. Thanks for posting this. I just made my first graph using yEd on my Ubuntu machine and it turned out great! Never heard of yEd before now. Excellent free tool!

Leave a comment

Your email address will not be published. Required fields are marked *