Jan 15, 2024 5 min read

How to Install GitHub Desktop on Ubuntu 22.04

Install GitHub Desktop on Ubuntu 22.04 with our step-by-step tutorial. It is a GUI application that facilitates with version control on GitHub.

Install GitHub Desktop on Ubuntu 22.04
Install GitHub Desktop on Ubuntu 22.04
Table of Contents

Introduction

Before we discuss how to install GitHub desktop on Ubuntu 22.04, let's first understand-What is GitHub Desktop?

GitHub Desktop is a popular graphical user interface (GUI) application that allows developers to interact with version control repositories on GitHub. It enables collaboration, change tracking, and project contribution by simplifying the management of code repositories. Although Ubuntu 22.04 is among the Linux versions of GitHub Desktop, it is primarily designed for Windows and macOS users.

The installation of GitHub desktop on Ubuntu 22.04 will be covered in this tutorial.

Advantages

  1. User-Friendly Interface: GitHub Desktop provides an intuitive and user-friendly interface for managing repositories, making it easier for developers to navigate and work with their code.
  2. Effortless Collaboration: With GitHub Desktop, you can easily collaborate with others on GitHub by cloning, branching, and merging repositories. It simplifies the process of collaborating on projects and resolving conflicts.
  3. Visual Diff Viewer: GitHub Desktop includes a visual diff viewer that allows you to compare changes in files, making it easier to review code changes and understand the impact of each modification.
  4. Commit History and Branch Management: GitHub Desktop provides a visual representation of commit history and branch management, allowing you to track the progress of your code and switch between branches seamlessly.
  5. Integration with GitHub Ecosystem: GitHub Desktop seamlessly integrates with other GitHub services and features, such as pull requests, issues, and notifications, providing a comprehensive workflow for managing projects on GitHub.

Installing GitHub Desktop Client on Ubuntu 22.04

Method 1. Using the Deb repository

Step 1. Update Packages

To guarantee that all available package updates are installed on your Ubuntu Linux machine, start by running the system update command on it. Additionally, this operation will update the default package manager's (APT) package index cache.

sudo apt update && sudo apt upgrade

Step 2. Add ShiftKey GPG Key

Currently, Linux operating systems—including Ubuntu—cannot download the official GitHub Desktop client program. We are pursuing GitHub Desktop - The Linux Fork by ShiftKey, a project that is hosted on GitHub.

To utilize the repository provided by the fork's creators on our system, run the following command in your Ubuntu terminal to add the project's GPG key.

wget -qO - https://mirror.mwt.me/shiftkey-desktop/gpgkey | gpg --dearmor | sudo tee /etc/apt/keyrings/mwt-desktop.gpg > /dev/null

Step 3. Add GitHub Desktop repository on Ubuntu

To install GitHub Desktop fork packages on Ubuntu 22.04, let's add the repository first, followed by the GPG key. By simply running the system update and upgrade command, we can quickly obtain future updates of the application instead of having its Debian packages bundled as executable binary. This is a benefit of using a repository technique.

sudo sh -c 'echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/mwt-desktop.gpg] https://mirror.mwt.me/shiftkey-desktop/deb/ any main" > /etc/apt/sources.list.d/mwt-desktop.list'

Remember to execute the system update command once more following the repository addition.

sudo apt update

Step 4. GitHub Desktop installation on Ubuntu 22.04

At last, all the components needed to download and launch the GitHub Desktop App for Ubuntu Linux have been integrated. Let's utilize Ubuntu's integrated package manager, APT, to install it on our Linux machine at last.

sudo apt install github-desktop

Method 2. Using Flatpak

Step 1. Install Flatpak

To avoid using the repository technique, one option is to use the Flatpak Universal Package Manager. Nevertheless, it is not by default usable on Ubuntu, in contrast to Snap. As a result, we must install it manually.

Here are the commands to follow.

sudo apt install flatpak

After the installation is finished, add the Flathub remote repository so that we can install different packages on our Linux system from it.

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

Once each of those commands are finished, our Ubuntu OS will be successfully enabled for Flatpak; however, a system reboot is necessary. This ensures the package manager's correct Linux integration.

sudo reboot

Step 2. Install the Linux GitHub Desktop application using Flatpak.

Let's use Flatpak to download and install the GitHub desktop release on Ubuntu 22.04 Linux via Flathub now that the system has restarted.

The command to install Flatpak on GitHub Desktop may be found here.

flatpak install -y flathub io.github.shiftey.Desktop

Step 3. Run Linux GitHub Desktop

Using the Activities link from the Taskbar or the Windows key on your keyboard to search GitHub will launch the application, regardless of the method you used. Click to run the same as soon as its icon shows up.

GitHub Desktop

Now, to manage Git repositories directly on the Ubuntu Linux system, log in with GitHub.com or GitHub Enterprise using your account information.

UI of GitHub Desktop

The following commands can be used to launch the Git GUI client application from the command line:

github-desktop

How to update the app on Linux

We can install any upcoming upgrades for the GitHub Desktop app using the same manner, depending on how you installed it on Ubuntu.

Those who have utilized the repository technique only need to execute the following system update command:

sudo apt update && sudo apt upgrade

Whereas, Flatpak users need to run:

flatpak update

Uninstall or Remove GitHub Desktop from Ubuntu

GitHub Desktop may be easily removed from Ubuntu using a simple procedure.

Using the apt package manager is the initial step in removing GitHub Desktop from your Ubuntu system. Launch the terminal window, then enter:

sudo apt-get remove github-desktop.

This command will remove all GitHub Desktop-related packages, including with any system data and configuration files.

For users of Flatpak, the second approach is as follows:

flatpak remove --delete-data io.github.shiftey.Desktop

FAQs to Install GitHub Desktop on Ubuntu 22.04

Can I use GitHub Desktop with repositories hosted on services other than GitHub? 

While GitHub Desktop is primarily designed for GitHub, it can be used with repositories hosted on other platforms as well, as long as they support the Git version control system.

Does GitHub Desktop support both public and private repositories? 

Yes, GitHub Desktop supports both public and private repositories hosted on GitHub.

Can I perform all Git operations using GitHub Desktop? 

GitHub Desktop provides a subset of Git operations, including cloning, committing, branching, and merging. For advanced Git operations, you may need to rely on the command-line interface.

Can I use GitHub Desktop without an internet connection? 

GitHub Desktop requires an internet connection to interact with remote repositories on GitHub. However, you can continue to work with local repositories and perform Git operations offline.

Does GitHub Desktop have keyboard shortcuts for quick actions?

Yes, GitHub Desktop provides several keyboard shortcuts to speed up common tasks. You can find the list of available shortcuts in the application's documentation or settings.

Can I configure GitHub Desktop to use a specific Git version? 

GitHub Desktop uses the Git version installed on your system. If you have multiple Git versions, you can configure the preferred Git version by adjusting your system's environment variables.

How do I update GitHub Desktop on Ubuntu 22.04? 

Since the Linux version of GitHub Desktop is unofficial, updates may not be provided through official channels. You can check for updates on the GitHub release page and follow the installation instructions for newer versions.

Conclusion

Although Ubuntu 22.04 does not officially support GitHub Desktop, you may still use its user-friendly interface and make your interactions with Git repositories easier by downloading an unauthorized version. GitHub Desktop improves Ubuntu developers' productivity and workflow with features like visual diff viewer, easy collaboration, and connection with the GitHub ecosystem.

If you have any queries, feel free to ask them in the comments section, and we would be happy to respond to them....

Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to DevOps Tutorials - VegaStack.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.