install gnucash on ubuntu

How to Install GnuCash on Ubuntu 22.04 LTS

Wondering how to install GnuCash on Ubuntu machine? 

We’re here to help. 

GnuCash is a reliable accounting software known for its double-entry system, making it ideal for businesses of all sizes. 

In this tutorial, we will guide you in installing GnuCash on your Ubuntu 22.04 LTS systemπ. Whether you’re a solopreneur or managing a small business, GnuCash offers a range of features to simplify your financial record-keeping.

Without wasting any more time, let’s jump right in!

What You’ll Need

For this tutorial, you’ll need the following:

  • A Ubuntu machine with root privilege or superuser access. 
  • If you’re installing it using the Flatpak distribution, you must ensure that Flatpak is also installed on the Ubuntu machine. Here’s a step-by-step guide on how to install Flatpak on your Ubuntu machine.

How to Install GnuCash on Ubuntu 22.04 LTS: Step-by-Step

Step 1: Update the Ubuntu Machine

  1. The first step is to update your Linux machine. Since we are using Ubuntu, we’ll update using the APT package which comes preinstalled with your Ubuntu version. For this step, open the terminal by pressing the Ctrl + Alt + T keys. Alternatively, you can also select the Terminal from the Applications menu.
  1. Next, enter the following command to update the Ubuntu machine:
sudo apt update && sudo apt upgrade
update linux machine

You should enter the Ubuntu password while executing the command. However, you won’t be prompted for a password if you are a root user. You will also be prompted for confirmation to continue with the update. Type “yes” and hit the Enter key to continue. Wait for the process to finish.

Step 2: Install Essential Libraries

  1. We will now proceed to install the prerequisite tools needed for GnuCash. These tools include build-essential to build software, cmake, libncurses5-dev, libncursesw5-dev and the Git version control system. To install them, enter the following command:
sudo apt install build-essential cmake libncurses5-dev libncursesw5-dev git
install essential libraries

Note: Make sure to press “y” when prompted. You’ll get this prompt when installing packages as they occupy more space on the machine. Hence, whenever you’ll install packages, the installer will prompt for your permission. This’ll install the required build files needed to run GnuCash on Ubuntu.

Step 3: Install GnuCash on Ubuntu Using APT Package

  1. The next step is to install GnuCash itself. The repository for GnuCash is available by default via the APT package manager. For this step, we’ll use the install command as shown below:
sudo apt install gnucash
install gnucash on ubuntu

Wait for the process to complete and install the required files. Take note this may take some time, depending on the speed of your internet connection.

Step 4: Verify Installation By Checking GnuCash Version

  1. Once the process is complete, you can verify the installation status by checking the GnuCash version. This can be done by using the --version or -v option. Here’s how:
gnucash --version
check gnucash version

(Optional) Step 5: Launch GnuCash CLI Tool

  1. Now you can launch GnuCash from the Applications menu directly (in which case you can skip this step entirely and proceed to the next) or use the GnuCash CLI tool if you prefer the more hacky way. To launch the GnuCash software from the command line, simply type:
gnucash-cli -h
  1. You’ll get a list of options you can use with the GnuCash command-line interface utility, as shown in the screenshot below:
gnucash cli

The general syntax for GnuCash CLI looks like this:

gnucash-cli [options] [ accounts.gnc ]/[datafile]

GnuCash CLI offers two default modes: 1) quote mode and 2) report mode, each serving different purposes.

In quote mode, you can obtain real-time information about foreign currencies and stocks, allowing you to stay updated with the latest market status.

On the other hand, report mode enables you to generate various reports based on the data file you provide, giving you valuable insights into your financial records.

Furthermore, the GnuCash CLI extends its functionality to support MySQL and PostgreSQL files, expanding your options for data integration and management.

Step 6: Launch GnuCash Application on Ubuntu

  1. Once you’ve installed the application, launch it from the Applications menu. For this step, go to the Applications menu first. 
  2. After that, type “gnucash” in the search bar. Hit the Enter key once you see the application icon to launch it. The application should look like this, as seen in the screenshot below:
gnucash application

(Alternative) Step 7: Install GnuCash on Ubuntu Using Flatpak

Alternatively, you can install GnuCash from Flatpak. If you don’t have the Flatpak packages installed, follow the steps in this section to set up GnuCash.

  1. First, open the terminal by pressing the Ctrl + Alt + T keys.
  2. Next, install the flatpak package from APT using the command below: 
sudo apt install flatpak
install gnucash on ubuntu using flatpak
  1. Type your password if you get a prompt and hit the Enter key to continue. Also, make sure to press y  to continue with the installation.
  2. After that, add the Flathub repository as shown below:
flatpak remote-add --if-not-exists flathub
  1. Once you’ve added the repository, you can now install GnuCash using Flatpak. For this step, type:
flatpak install flathub org.gnucash.GnuCash

What to Do if I Want to Uninstall GnuCash on Ubuntu?

In case you no longer need to run the GnuCash application on Ubuntu, you can uninstall it.The command to do so, as shown below:

sudo apt uninstall gnucash

Alternatively, you can uninstall it using Flatpak manager. Here’s the command to enter:

flatpak uninstall org.gnucash.GnuCash

How Do I Update GnuCash on Ubuntu?

To update GnuCash on Ubuntu, simply use the update command. For instance, type:

sudo apt update gnucash

To update it via flatpak, execute the command given below:

flatpak update org.gnucash.GnuCash


That concludes our comprehensive tutorial on installing GnuCash on Ubuntu! Throughout this guide, you have gained valuable knowledge on two installation methods: the APT package and the Flatpak package.   Furthermore, you have also learned how to launch, update, and uninstall the GnuCash app effectively.

We hope this tutorial has helped simplify the process of installing and managing GnuCash for your business accounting needs. For more tutorials on ERP and business-related applications, learn about FOSSBilling, Odoo and ERPNext.

If this article helped you, please share it

Related Posts