5 Ways to Install Discord on Ubuntu 22.04
Discord, initially evolved as a gaming community for gamers. However, it has now turned into a communication platform with additional support for gamers. It offers communication through calls (voice/video), text, media, etc. Discord allows gamers to stream the games by creating the servers.
Being so feature-enriched, Discord is often used as the Slack alternative to manage the team or communicate with them. Because of its wide range of user communities, Discord’s Ubuntu client is also available officially.
Today’s post will address all the possible methods to install Discord on Ubuntu 22.04.
- How to Install Discord on Ubuntu 22.04
- How to Completely Uninstall/Remove Discord From Ubuntu 22.04
- Bottom Line
How to Install Discord on Ubuntu 22.04
Discord is available on Ubuntu in 5 ways. The first four methods are CLI-based, (snap, deb file, flatpak, tar.gz) and the last one is GUI. Before we get into the installation methods, you must update the packages list on your system:
sudo apt update
Let’s get into the first method:
Snap
Snap is a renowned applications store for Linux systems (available irrespective of the distribution). Discord is available on it as a snap. Let’s get it from the snap first:
Use the below command to install Discord on Ubuntu 22.04:
sudo snap install discord
The version 0.0.43 is installed using the snap.
Launch it either using the command (discord) or from the applications menu:
Here’s the first interface:
Deb File
Being one of the most used applications, Discord has its official support for Ubuntu users. Its deb package can be obtained from Discord’s official website. Let’s see how it can be installed:
Get/Download the deb package file from the Discord Download Page:
wget "https://discord.com/api/download?platform=linux&format=deb" -O discord.deb
Or you can download by navigating to the website:
Now, install the Discord:
sudo apt install ./discord.deb
Let’s check the version:
apt show discord
Flatpak
Flatpak is another package manager for Ubuntu (and other Linux distributions). It offers Discord support through flathub (an applications repository). Flatpak/Flathub provides a feature-enriched Discord version with dedicated dependencies/libraries. Let’s install it:
Step 1: Install Flatpak and Add/Enable Flathub
Flatpak/Flathub support is not available by default. First, install Flatpak and add the Flathub repository’s support:
sudo apt install flatpak flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Step 2: Install Discord
Use the application ID of Discord with the flatpak command to install it:
flatpak install flathub com.discordapp.Discord
Use the flatpak list command to check the version:
flatpak list | grep Discord
To run the flatpak/flathub-based Discord, use the command:
flatpak run com.discordapp.Discord
Tar.gz File | An Executable
On Discord’s official website, there are two packages available for installation, i.e., deb and tar.gz. The tar.gz package contains a direct command line executable and a desktop launcher too. Let’s get into this method:
Step 1: Download the tar.gz File
Go to the Downloads Page and get/download the latest available version. We used the wget command to download:
wget "https://discord.com/api/download?platform=linux&format=tar.gz" -O discord.tar.gz
Or you can directly download it from the website through the browser:
Step 2: Extract the tar.gz
Extract the file using the tar utility:
tar -xf discord.tar.gz
Inside the directory, the “Discord” executable is placed, as shown below:
ls -l ~/Discord
Step 3: Create the Symbolic Link of the Executable
Currently, the discord will be accessible through the extracted directory. To make it system-wide available, create a symbolic link of the discord’s executable to the directory of system-wide executables (/usr/bin):
sudo ln -s ~/Discord/Discord /usr/bin/discord
Note: You can also add the path of the “Discord” executable to the $PATH variable to get it recognized user/system-wide.
Step 4: Set up the Discord Desktop Application
There is a “.desktop” file in the extracted directory as well. Open it in any editor and:
- Update the value of the “Exec” parameter to the discord’s executable (which is set in the previous step, /usr/bin/discord).
- Also, update the “Icon” parameter which represents the icon for the discord. The icon path can be found in the extracted directory (with the .png extension).
sudo nano ~/Discord/discord.desktop
Now, copy the “discord.desktop” file to the “/usr/share/applications/” and “~/Desktop” directories:
sudo cp ~/Discord/discord.desktop /usr/share/applications/ sudo cp ~/Discord/discord.desktop ~/Desktop
Step 5: Grant the Launch Permission
Right-click on the discord application and click on “Allow Launching”:
Click on it to launch the discord application:
These are the four CLI methods to install Discord.
Ubuntu Software Centre | GUI
The GUI-based installation is the reflection of the snap method (or the flatpak). Open the Ubuntu Software Centre and search for “discord”:
Open it and opt for the installation:
In the same window, you will get the version details as shown below (0.0.43):
Provide the user password and proceed with the installation:
Soon, Discord will be installed and its launcher will be available in the applications menu.
How to Completely Uninstall/Remove Discord From Ubuntu 22.04
The removal process depends on the method you followed for installation. All the possibilities are discussed one by one:
For Deb-Based Discord
Use the apt autoremove and purge options to remove the Discord installed using the deb-based package:
sudo apt autoremove discord --purge
For a Snap-Based Discord
If you have a snap-based Discord installed, use the below command to remove it:
sudo snap remove discord
For a Flatpak-Based
Discord installed from the flatpak/flathub can be removed using the command:
flatpak uninstall com.discordapp.Discord
For an Executable-Based (tar.gz) Discord
The “tar.gz” based installation requires the direct removal of associated files. First, remove the directory where the file was extracted. This will disable Discord’s execution from the terminal and from the app as well. Further, you can remove the “.desktop” application of Discord as well:
sudo rm -r <Path/to/Extracted/Directory> sudo rm /usr/share/applications/discord.desktop
Remove the “.desktop” instance from the Desktop as well:
sudo rm ~/Desktop/discord.desktop
For a GUI-Based Installation
If you want to remove the Discord using GUI, open the Software and Center and open the Discord. Here, you will find the Remove option:
Confirm it to start the removal process:
Soon, the Discord will be removed.
Bottom Line
Four CLI-based and One GUI method refer to installing Discord on Ubuntu 22.04. All the methods have provided the 0.0.43 version, which is the latest one at the time of writing the article. Among all these, the Flatpak/flathub-based method provides fully loaded installation (it contains dependencies and configurations). If space and time do not bother you while installing, then go for Flatpak. Otherwise, you may go for Snap, Deb file, or the tar.gz-based executable.
This post has demonstrated the 5 easiest ways to install Discord on Ubuntu 22.04.