Download and Install GitHub Desktop For Ubuntu 20.04|22.04
Posted July 14, 2024
It’s effortless to Download and install GitHub Desktop GUI on OS like Windows and Mac. However, it is not straightforward how you should install GitHub Desktop on your Linux/Ubuntu machine. This guide teaches you how to easily install and get GitHub Desktop ready on Ubuntu and Debian.
GitHub Desktop gives you a GUI interface with all the features you would perhaps use with Git. Git will only use commands. Due to its learning curve, beginners find it easier to grasp and install GitHub Desktop and still get access to GitHub features on a GUI. Get ready to learn simple tricks to Download|Install GitHub Desktop on Ubuntu.
Download GitHub Desktop on Ubuntu
For this guide, we’ll be referencing this GitHub Desktop repo that provides different distributions for getting GitHub GUI.
To Download the latated GitHub Desktop binaries, you will check the releases here. For this case, we have GitHub Desktop 3.4.2
ready. You will then copy the linux1.deb
link. For example:
https://github.com/shiftkey/desktop/releases/download/release-3.4.2-linux1/GitHubDesktop-linux-amd64-3.4.2-linux1.deb
If ready use wget
to download the selected (check amd64
) GitHub Desktop to Ubuntu as follows:
sudo wget https://github.com/shiftkey/desktop/releases/download/release-3.4.2-linux1/GitHubDesktop-linux-amd64-3.4.2-linux1.deb
Based on the direction you execute the above command, check the GitHubDesktop-linux-arm64-3.4.2-linux1.deb
file, you might as well use the ls
command to confirm the name of the downloaded file.
Install GitHub Desktop on Ubuntu
We have GitHub Desktop as a .deb
, Debian-based Linux. Because of this, gdebi-core
will be the easiest way to handle GitHub Desktop dependencies. It will fetch and install them from the repositories. This means you won’t need to use manual resolution of dependencies like you would if using dpkg -i
.
Use the following command to get gdebi-core ready:
sudo apt install gdebi-core
You will now use gdebi to install the .deb
package as follows:
sudo gdebi GitHubDesktop-linux-amd64-3.4.2-linux1.deb
Use this command to finally confirm GitHub Desktop is on Ubuntu:
dpkg -l | grep github
GitHub Desktop should now be ready on your Ubuntu machine.
Open or pin the installed GitHub GIU and log in to your GitHub account and you are ready to go:
Installing GitHub Desktop On Ubuntu using Package Manager
If you would prefer to install GitHub Desktop on Ubuntu using the package manager, Here are the steps you need:
First, Download and Add the GPG Key GitHub Desktop to Ubuntu:
wget -qO - https://apt.packages.shiftkey.dev/gpg.key | gpg --dearmor | sudo tee /usr/share/keyrings/shiftkey-packages.gpg > /dev/null
Here you will have a combination of:
wget -qO - https://apt.packages.shiftkey.dev/gpg.key
to download the GPG key from the URL quietly and output it to stdout.gpg --dearmor
will convert the ASCII-armored GPG key to binary format.sudo tee /usr/share/keyrings/shiftkey-packages.gpg > /dev/null
writes the binary GPG key to/usr/share/keyrings/shiftkey-packages
.gpg using sudo privileges.
Next, add the Shiftkey Repository:
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'
Here:
sudo sh -c 'echo ... > /etc/apt/sources.list.d/shiftkey-packages.list'
runs a shell command with sudo privileges to add a new repository entry to the system.- The repository line
deb [arch=amd64 signed-by=/usr/share/keyrings/shiftkey-packages.gpg] https://apt.packages.shiftkey.dev/ubuntu/ any main
will add binary package repository.
You will finally install use apt package manager to get GitHub Desktop ready on Ubuntu:
sudo apt update && sudo apt install github-desktop
How to Uninstall GitHub Desktop on Ubuntu
If you would finally want to Uninstall the GitHub desktop on Ubuntu, use apt
as follows:
- Uninstall the package using apt:
sudo apt remove --purge github-desktop
- Remove any unnecessary dependencies:
sudo apt autoremove
Conclusion
I hope you can now get GitHub Desktop running on your Ubuntu or Debian machine.