GitHub Desktop is a powerful and user-friendly application that simplifies managing and interacting with GitHub repositories. It offers a graphical interface for Git, making handling version control tasks such as committing changes, creating branches, and managing pull requests easier. GitHub Desktop is ideal for beginners and experienced developers, providing a seamless collaboration and project management workflow.
To install GitHub Desktop on Linux Mint 22, 21, or 20, you have several methods available. You can manually download and install the .deb package from the ShiftKey GitHub Desktop project, use the ShiftKey APT third-party repository for easier maintenance and future upgrades, or opt for Flatpak with Flathub. This guide will walk you through each installation method.
Update Linux Mint Before GitHub Desktop Installation
Before beginning the installation process, it’s crucial to ensure your system is current to avoid conflicts. Update your system’s package lists and install available updates by executing the following command in the terminal:
sudo apt update && sudo apt upgrade
This command ensures that your Linux Mint system has the most recent software installed.
Method 1: Install GitHub Desktop via .deb Package
While GitHub officially supports only Windows and macOS, Linux users can access the platform through a “shiftkey/desktop project.” This fork provides Linux-compatible packages for various distributions.
To start, visit the releases page and download the most recent release. Although this guide focuses on installing the “.deb” package, you can also choose the AppImage if you prefer and are familiar with it.
Download the latest release using the following command in your terminal:
wget https://github.com/shiftkey/desktop/releases/download/release-3.1.7-linux1/GitHubDesktop-linux-3.1.7-linux1.deb
Note: Please do not copy the above command; it will become outdated shortly; it’s only for demonstration purposes; visit the link to get the latest version.
This command downloads the .deb file. Now install the version downloaded. Our guide was version 3.1.7 RC1, for example. Replace <filename> in the command below with the name of the “.deb” file you downloaded:
sudo dpkg -i <filename>.deb
Example with 3.1.7 RC1:
sudo dpkg -i GitHubDesktop-linux-3.1.7-linux1.deb
For those Linux Mint users who might not know, dpkg is a package manager used to install, remove, and manage Debian packages. It’s a fundamental tool for installing .deb packages on your Linux Mint system.
The “-i” flag is a command option that tells dpkg to install the specified package. When using dpkg with the “-i” flag, provide the filename of the package you want to install as an argument.
Method 2: Install GitHub Desktop via PPA
The second approach to installing GitHub Desktop is similar to the first method. Two third-party APT repositories in the United States are mirrors for the shiftkey/desktop GitHub project. These repositories are endorsed and listed on the project’s page. This method is preferable as it enables easy updating of your GitHub Desktop application and other packages. However, some users in other parts of the world may experience difficulties connecting to a US mirror, although this is not expected to impact most users.
Here are two mirrors. It is recommended to use the first one, but you can opt for the second one if you encounter any issues.
Import GPG key and repository for @shiftkey:
wget -qO - https://apt.packages.shiftkey.dev/gpg.key | gpg --dearmor | sudo tee /usr/share/keyrings/shiftkey-packages.gpg > /dev/null
sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/shiftkey-packages.gpg] https://apt.packages.shiftkey.dev/ubuntu/ any main" > /etc/apt/sources.list.d/shiftkey-packages.list'
Alternative mirror by @mwt:
wget -qO - https://mirror.mwt.me/shiftkey-desktop/gpgkey | gpg --dearmor | sudo tee /etc/apt/keyrings/mwt-desktop.gpg > /dev/null
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'
After importing one of the mirrors, a quick APT update is recommended to ensure that the newly added lists are recognized.
sudo apt update
To install GitHub Desktop, use the following command:
sudo install github-desktop
Method 3: Install GitHub Desktop via Flatpak and Flathub
The third method for installing GitHub Desktop on Linux Mint involves utilizing Flatpak, a powerful utility that streamlines the installation and management of Linux applications and the Flathub repository. Flatpak is natively installed on Linux Mint as a replacement for Snapcraft, which is disabled on all Linux Mint systems.
To activate Flathub for Flatpak on your Linux Mint system, execute the following command in your terminal:
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Once Flathub is enabled, install GitHub Desktop using the subsequent flatpak command:
flatpak install -y flathub io.github.shiftey.Desktop
This command downloads and installs the GitHub Desktop application, including all necessary dependencies, onto your Linux Mint system. This approach allows you to easily manage and update your GitHub Desktop application alongside other Flatpak applications.
Launching GitHub Desktop
Once you have successfully installed GitHub Desktop on your Linux Mint system, there are several ways to launch it, depending on your installation method.
CLI Launch Method on Linux Mint for GitHub Desktop
github-desktop
If you installed GitHub Desktop using Flatpak, use the following command to launch it:
flatpak run io.github.shiftey.Desktop
GUI Launch Method for GitHub Desktop
You can also find and launch GitHub Desktop through your system’s application menu. To do this, click the “Menu” icon on your taskbar, then navigate to the “All Applications” section. Look for the GitHub Desktop icon, click on it, and the application will launch, ready to use with your projects.
Managing with GitHub Desktop
Update GitHub Desktop
The method for updating GitHub Desktop on Linux Mint varies depending on whether you installed it using Flatpak, a .deb package, or APT. Staying current is essential for the smooth functioning of your system and ensuring you have access to the latest features and security updates.
Flatpak Update Command Method
To update GitHub Desktop installed via Flatpak, execute the following command in the terminal:
flatpak update
APT Update Command Method
If you installed GitHub Desktop using the APT mirror, you can update it using standard APT commands:
sudo apt update && sudo apt upgrade
.deb Update Method on Linux Mint
Manual updates are necessary for those who installed GitHub Desktop using a .deb package. Visit the official GitHub Desktop releases page, download the most recent .deb package, and install it using the dpkg command.
Remove GitHub Desktop
Should you decide that GitHub Desktop is no longer needed on your Linux Mint system, follow these simple steps to remove it.
APT GitHub Desktop Command Method
To remove GitHub Desktop installed using the APT package manager, use this command:
sudo apt remove github-desktop
Removing the APT repository is recommended if you don’t use this method to reinstall GitHub Desktop. Depending on the repository you imported, use the appropriate command:
sudo rm /etc/apt/sources.list.d/shiftkey-packages.list
sudo rm /etc/apt/sources.list.d/mwt-desktop.list
Flatpak GitHub Desktop Remove Command Method
For installations using Flatpak, you can use the following command to remove GitHub Desktop, including all its data:
flatpak remove -y --delete-data io.github.shiftey.Desktop
This command ensures a clean uninstallation by deleting all associated data and configuration files, freeing up space on your system.
.deb GitHub Desktop Remove Command Method
If you installed GitHub Desktop using a .deb package, you’ll need to use the APT command to remove it manually:
sudo apt remove github-desktop
This command uninstalls the package but leaves the associated data and configuration files intact. To remove these as well, use the –purge option.
Conclusion
With GitHub Desktop successfully installed on your Linux Mint system, you can efficiently manage your GitHub repositories with a user-friendly interface. Whether you choose to install it manually, through the ShiftKey APT repository, or via Flatpak, each method provides a reliable way to keep your application up-to-date. Enjoy the enhanced workflow and collaboration features that GitHub Desktop brings to your development projects.