How to Install Sourcetree on Ubuntu 24.04, 22.04 or 20.04 Linux

Wine is the solution that we can use to install the SourceTree software on Linux systems including Ubuntu. Here is the tutorial to learn the steps we need to follow to get this free Git Client software. 

Sourcetree is a popular but free client software to manage repositories based on Git and Mercurial. However, it is not available for Linux and works only for Windows and Mac.

The graphical interface of this client software is designed to simplify the Git and Mercurial version control systems. It is the GUI and clean navigation that makes SourceTree easier for software developers to manage their source code repositories and collaborate with their development teams.

Apart from this other common tasks can be performed using the SourceTress such as creating repositories, pushing and pulling changes, and working with branches.


Before you start the installation process, you will need to make sure that you have the following prerequisites:

  • A system running Ubuntu Linux
  • A user account with sudo privilege

Note: This tutorial is just for educational purpose and because of Wine we cannot assure that the software will work on Linux as it is natively for Windows or macOS

Step 1: Start with a System update

We should first run the system update command on our Linux to refresh the package manager index cache. So, open your command terminal and run the given command:

sudo apt update

Step 2: Install Wine on Ubuntu Linux

As we know SourceTree is not available for Linux, therefore to install it we are using Wine on Linux. As per the distro, the command to install it will be different. Here we are using Ubuntu 22.04, hence follow the tutorial we already have done for it: Steps to install Wine on Ubuntu 22.04 whereas Ubuntu 20.04 can use this link.

Yet, those who want to go through the commands quickly, here are they:

  • Add 32-bit Arch support:
sudo dpkg --add-architecture i386
  • For Ubuntu 22.04 LTS users only:
wget -nc
sudo mv winehq-jammy.sources /etc/apt/sources.list.d/
sudo mkdir -pm755 /etc/apt/keyrings
sudo wget -O /etc/apt/keyrings/winehq-archive.key
  • For Ubuntu 20.04 LTS users only:
wget -O - | sudo apt-key add -
sudo add-apt-repository 'deb focal main'
  • Run system update
sudo apt update
  • Installation command will be the same for both versions
sudo apt install --install-recommends winehq-staging

Step 3: Download the Sourcetree Package

The SoruceTree is not available as the Debian binary, so visit the official website of this Git Tool and download the Executable binary available for Windows.

Download Sourcetree Git GUI for Linux

Step 4: Use wine and run SourceTree

Once you have downloaded the file using the browser, it will be in the Downloads folder by default. Now, in your command terminal run the given command:

wine ~/Downloads/SourceTreeSetup-*.exe

Alternatively, you can graphically open the Downloads folder from the file manager and right-click on the SourceTreeSetup-*.exe file to select “Open with other Application” then Wine Windows Program Loader.

Step 5: Installing SourceTree on Ubuntu

  1. Next, you will see the Installation Wizard of SourceTree. Those who want to connect the BitBucket can do it here. Otherwise, just press the Skip button because we can do this later as well.
Installation wizard of SourceTree on linux
  1. SourceTree supports Git and Mercurial, if you want to install any of them while installing the software, select the one and move forward. LearnHow to install Git on Almalinux or Rocky Linux 8
Pick tools to download and install
Install Mercurial and Git on SourceTree
Tool Installation
  1. The software will automatically pick the username, you can rename it.
Set Machine and Email
  1. Once the installation is finished, you will see the SourceTree Desktop shortcut icon. Right-click it and select the “Allow Launching” option.
Create a Desktop Shortcut

User Interface

Soon the user interface of the SourceTree will appear. You can start using it. However, you may face a crashing problem.

Installing SourceTree in Ubuntu 22.04 or 20.04 Linux

1 thought on “How to Install Sourcetree on Ubuntu 24.04, 22.04 or 20.04 Linux”

  1. This article is BS, the Sourcetree installer doesn’t run under admin privileges and Wine doesn’t support changing that.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.