How to Install Draw.io on Ubuntu 24.04, 22.04 or 20.04

This guide will demonstrate the process of installing Draw.io on Ubuntu 24.04, 22.04, or 20.04 LTS Linux releases utilizing the command-line terminal with three distinct options: .deb, Snap, or Flatpak with Flathub.

Draw.io stands out as a premier diagramming tool, designed with simplicity and efficiency in mind. Its core strength lies in its versatility, supporting a wide array of diagram types, including flowcharts, process diagrams, UML models, and more. The platform is engineered for ease of use, allowing both novices and professionals to visualize complex information effortlessly. Key features include:

  • Extensive Library: Access to a vast collection of shapes and templates for various diagramming needs.
  • Cross-Platform Compatibility: Works seamlessly across different operating systems, providing a consistent user experience.
  • Real-Time Collaboration: Enables teams to work together on diagrams in real-time, enhancing productivity.
  • Highly Customizable: Offers extensive customization options for diagrams, including colors, styles, and text.
  • Integration Capabilities: Easily integrates with various third-party platforms like Google Drive, Dropbox, and GitHub for efficient workflow management.
  • Offline Mode: Allows for diagram creation even without an internet connection, ensuring uninterrupted productivity.
  • Export and Import Functions: Supports multiple file formats for exporting and importing, facilitating easy sharing and collaboration.
  • User-Friendly Interface: Designed with an intuitive interface to simplify navigation and diagram creation.

With its comprehensive set of features, Draw.io empowers users to convey ideas and information visually, making it an indispensable tool for professionals across industries.

Now, let’s dive into the technical how-to of setting up Draw.io on your Ubuntu system.

Install Draw.io on Ubuntu via .deb package

Update Ubuntu Before Draw.io Installation

First, ensure that your system’s existing packages are up to date. This step is crucial to prevent any conflicts that might arise during the installation of Draw.io. Run the following commands in your terminal to update your system:

sudo apt update && sudo apt upgrade

These commands will refresh your package lists and upgrade the packages to their latest versions, ensuring a clean environment for the installation.

Install Initial Required Packages for Draw.io Installation

Next, install the necessary packages wget and curl. These utilities will aid in downloading files from the internet. Execute the following command:

sudo apt install curl -y

The -y flag automatically confirms the installation, providing a smoother process.

Download Draw.io Latest .deb package

Now, proceed to download the latest Draw.io desktop package for Ubuntu. Utilize the command below:

curl -s https://api.github.com/repos/jgraph/drawio-desktop/releases/latest | grep browser_download_url | grep 'amd64\.deb' | cut -d '"' -f 4 | wget -i -

Here’s a breakdown of how this command functions:

  • curl -s https://api.github.com/repos/jgraph/drawio-desktop/releases/latest: Silently fetches the latest release data from the Draw.io desktop repository.
  • grep browser_download_url: Filters the output to include only lines with download URLs.
  • grep 'amd64\.deb': Narrows down the results to Debian package files specifically for the amd64 architecture.
  • cut -d '"' -f 4: Extracts the download URL from the JSON response.
  • wget -i -: Downloads the .deb package using the extracted URL.

Install Draw.io Desktop on Ubuntu via APT Command

With the .deb package now downloaded, install Draw.io on your Ubuntu system. Run the command below:

sudo apt -f install ./drawio-amd64-*.deb

The -f or --fix-broken option in this command instructs apt to resolve any broken dependencies, ensuring that all required packages are installed or repaired. This results in a stable installation and a system free of broken packages, crucial when manually installing software via .deb files.

This is particularly useful when installing software manually using .deb files, as dependencies might not be satisfied yet, and this option helps in resolving such issues.

Install Draw.io on Ubuntu via Snapcraft (Snapd)

Install Snap Core

Begin the process by ensuring the snap core is present and up to date on your desktop. Unless you have previously removed snapd, it should be available on your system. This step is crucial for preventing any potential conflicts during the installation of Draw.io.

Execute the following command to install or update the snap core:

sudo snap install core

This command ensures that the snapd package management system is initialized correctly and ready for software installations.

Install Draw.io via Snap Command on Ubuntu

With the snap core in place, proceed to install Draw.io. Snap packages are well-maintained and offer a straightforward installation process. Although some users might prefer Flatpak for its extensive application support, Snapcraft ensures timely updates for Draw.io, making it an equally viable option.

Run the following command to install Draw.io:

sudo snap install drawio

This command fetches the latest version of Draw.io from the Snapcraft repository and installs it on your Ubuntu system.

Install Draw.io on Ubuntu via Flatpak and Flathub

Before installing Draw.io via Flatpak, ensure you have Flatpak installed on your Ubuntu system. If not, refer to this comprehensive guide: How to Install Flatpak on Ubuntu. Installing Flatpak is crucial as it is not included by default in Ubuntu distributions, considering Canonical, Ubuntu’s parent company, promotes Snap, its package manager.

Enable Flathub for Draw.io Installation

To initiate the installation process of Draw.io, you must first enable Flathub, the official repository for Flatpak applications.

Run the following command in your terminal to achieve this:

sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

This command ensures that your system can access and fetch applications from Flathub, setting the stage for a successful Draw.io installation.

Install Draw.io on Ubuntu via Flatpak Command

Once you have configured Flathub, proceed to install Draw.io using Flatpak. Run the following command:

flatpak install flathub com.jgraph.drawio.desktop -y

This command instructs Flatpak to install Draw.io directly from Flathub, ensuring you receive the most current version maintained by the package maintainers. Unlike Ubuntu’s software repositories, which prioritize stability and might offer older versions of applications, Flathub provides timely updates, enhancing performance and security.

Launching Draw.io on Ubuntu via CLI Commands or GUI

Upon successfully installing Draw.io through one of the available methods, you can initiate the application instantly from your terminal.

CLI Commands to Launch Draw.io

.deb Installation

If you have installed Draw.io via the .deb package, enter the following command in your terminal:

drawio

Snapcraft Installation

For those who have utilized Snapcraft for installation, the application can be launched with:

sudo snap run drawio

Flatpak Installation

Users who have opted for Flatpak installation need to execute:

flatpak run com.jgraph.drawio.desktop

GUI Method to Launch Draw.io

For desktop users who prefer a graphical approach, Draw.io is accessible via the application icon. Navigate through:

Activities > Show Applications > Draw.io
Launching Draw.io from the application icon on Ubuntu 24.04, 22.04, or 20.04.
Quick guide on launching Draw.io from the application icon in Ubuntu.

First-Time Tips with Draw.io on Ubuntu

Now that you’ve successfully installed Draw.io on your Ubuntu Linux system, you’re probably eager to dive in and create diagrams. This section will guide you through some essential tips and tricks to help you make the most out of your first-time experience with the software.

General Draw.io Tips with Ubuntu

  • Familiarize Yourself with the Interface: Spend some time exploring the Draw.io interface. Look at the different menus, toolbars, and panels. Understanding where everything is located will make your workflow smoother.
  • Keyboard Shortcuts: Make use of keyboard shortcuts. They can significantly speed up your diagram creation process. You can find a list of keyboard shortcuts in the ‘Help’ menu.
  • Save Your Work Regularly: Ensure that you save your work regularly. Draw.io provides various options, including saving directly to your computer or cloud storage services. Make sure to choose the one that suits your needs best.

Draw.io Customizations

  • Themes and Appearance: Draw.io allows you to customize the application’s appearance. You can change themes, adjust the background, and modify the color schemes. To do this, go to the File menu, select Preferences, and choose Themes.
  • Toolbars and Panels: You can customize the toolbars and panels based on your preference. Right-click on the toolbar or panel you want to modify and select the options that suit your workflow.
  • Setting Up Templates: If you create the same type of diagram frequently, consider setting up a template. This can be done by creating a diagram and then saving it as a template for future use.

Other Draw.io Tips

  • Integrate with Other Tools: Draw.io integrates well with other tools and platforms. Explore the options under the File menu to see how to export, import, and integrate your diagrams with other applications.
  • Online Resources and Community: There is a wealth of online resources, including tutorials, forums, and documentation specifically for Draw.io on Linux. Use these resources to enhance your skills and connect with other users.
  • Experiment and Practice: The best way to get comfortable with Draw.io is to practice. Create different diagrams, experiment with various features, and don’t be afraid to explore the software’s capabilities.

Following these tips, you should become more comfortable and proficient with Draw.io on your Ubuntu Linux system.

Draw.io ready for use on Ubuntu 24.04, 22.04, or 20.04 after successful installation.
Draw.io running on Ubuntu, ready for your creative projects.

Additional Commands for Draw.io on Ubuntu

Update Draw.io

To ensure optimal performance and access to the latest features, regularly update your Draw.io installation. Although update notifications typically appear automatically, they may occasionally fail to show up. In such cases, proactively check for updates using terminal commands tailored to your specific installation method.

Draw.io Installations via .deb:

For installations done using the .deb package, you must download and reinstall the latest version of the package to update Draw.io. This process ensures you have the most current features and security enhancements.

Snap Draw.io Update Method

Snap installations offer a straightforward update process. Execute the following command:

sudo snap refresh

This command checks for available updates and applies them, keeping your Draw.io version current.

Flatpak Draw.io Update Method

Flatpak users can update Draw.io by running the following:

flatpak update

This command ensures you receive the latest updates and improvements for Draw.io.

Remove (Uninstall) Draw.io

If you remove Draw.io from your system, use the command corresponding to your installation method.

.deb Remove Method

Execute the following command to uninstall Draw.io:

sudo apt remove drawio

This command removes the application from your system, freeing up space.

Snap Remove Method

To uninstall Draw.io installed via Snap, run:

sudo snap remove drawio

This command efficiently removes the application and its associated data.

Flatpak Remove Method

For Flatpak installations, use:

flatpak remove  --delete-data com.jgraph.drawio.desktop -y

Running this command ensures the complete removal of Draw.io and its data from your system.

Conclusion

In this guide, we walked you through the steps to install Draw.io on Ubuntu 24.04, 22.04, or 20.04 LTS using the command-line terminal, offering you options like .deb, Snap, and Flatpak with Flathub. It’s a straightforward process designed to get you up and running with one of the most versatile diagramming tools out there. Our final piece of advice? Dive in and start using Draw.io to its full potential, whether it’s for mapping out ideas, creating detailed diagrams, or collaborating with your team. And remember, the method you choose for installation can depend on your specific needs and setup preferences, but each one gets the job done. Happy diagramming!

Leave a Comment