How to install Discord on Deepin OS 20.7 or any other Debian-based distro

I'm a passionate software developer.
Search for a command to run...

I'm a passionate software developer.
Check your OS Let me show you three approaches to check what operating system you're using and if it's Ubuntu-Debian based. Linux Standard Base approach The command lsb_release -a is used to display information about the Linux Standard Base (LSB) an...
Components Introduction In order to truly understand props in React, we first need to be clear on what components are. A component is a reusable piece of the user interface that encapsulates structure, styling, and behavior. Instead of repeating the ...

Introduction Context By default, Codespace is using the GITHUB_TOKEN env var (the “Codespaces token”), which can’t create repos. It’s necessary to authenticate gh with a token/account that has the right scopes, or create the repo on the web first. Ob...

Solution Here it is: git commit --allow-empty-message -m "" Explanation To create a Git commit without a message, or with an empty message, you can use the --allow-empty-message flag with the git commit command. git commit --allow-empty-message -m "...

Steps Cleanup phase This phase’s goal is to removes existing containers, volumes, networks and images Stop and remove volumes docker compose down --volumes --remove-orphans The previous command stops and removes containers, networks, and default volu...

Steps Stop the service It’s not mandatory, but before uninstalling, it's a good practice to stop any running Docker services. sudo systemctl stop docker Remove docker packages It’s used to completely and forcefully remove a list of specified packag...

How to install Discord on Deepin OS 20.7 or any other Debian-based distro
You can try one of the following approaches.
The command "lsb_release -a" is used to display information about the Linux Standard Base (LSB) and distribution-specific information of your Linux system.
The "lsb_release" command is useful for identifying the distribution and its version in a standardized manner, particularly if you are writing scripts or need to retrieve distribution information programmatically.
lsb_release -a
The output should be something like this
No LSB modules are available.
Distributor ID: Deepin
Description: Deepin 20.7.1
Release: 20.7.1
Codename: apricot

The command cat /etc/os-release is used to display the contents of the "/etc/os-release" file, which contains information about the operating system distribution.
The "/etc/os-release" file is commonly used by various system utilities and scripts to determine the distribution and retrieve specific information about the operating system.
In the terminal
cat /etc/os-release
Your output should be something like the following:
PRETTY_NAME="Deepin 20.7.1"
NAME="Deepin"
VERSION_ID="20.7.1"
VERSION="20.7.1"
VERSION_CODENAME="apricot"
ID=Deepin
HOME_URL="https://www.deepin.org/"
BUG_REPORT_URL="https://bbs.deepin.org/"

In the terminal
cat /etc/debian_version
Output
10.10

In the terminal
sudo apt update
When it gets done, go to the following:
sudo apt upgrade
In the terminal:
wget "https://discord.com/api/download?platform=linux&format=deb" -O discord.deb
The wget command is used to download files from the internet using various protocols such as HTTP, HTTPS, FTP, and more.
It is a versatile tool for downloading files and automating file retrieval tasks from the command line.
-O discord.deb option specifies the output filename for the downloaded file. In this case, it will save the downloaded file as discord.deb on your local machine.
Output

Make sure you are in the same directory where you downloaded the "discord.deb" file before running this command.
In the terminal:
sudo apt install ./discord.deb
The apt command is a package management tool commonly used in Debian-based Linux distributions, including Deepin OS. It allows you to manage software packages, install, upgrade, and remove them, as well as resolve dependencies.
./ refers to the current directory, and discord.deb specifies the name of the package file you want to install. In this case, it refers to the discord.deb file you previously downloaded.
So, when you execute the sudo apt install ./discord.deb command, apt will attempt to install the Discord package from the "discord.deb" file located in the current directory.
After using the installation command, I ran into the following issue:
N: Download is performed unsandboxed as root as file '/home/calaca/discord.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)

Instead of copying and pasting, I wrote the same command again, using the tab key in order to find the file.
After re-running the installation command, I ran into the following issue:

I just ignored and I moved on.
You can choose one of the following options.
The "which" command in Linux is used to locate the executable file associated with a given command or program. It helps you determine the path to the binary file that will be executed when you run a particular command.
When you run the "which" command followed by the name of a command, it searches the directories listed in the "PATH" environment variable to find the corresponding executable file.
In the terminal
which discord
Output
/usr/bin/discord

The "dpkg -s" command is useful for checking the status of a specific package, verifying its installation, and retrieving detailed information about it, including its version and description.
dpkg -s discord
Output
Package: discord
Status: install ok installed
Priority: optional
Section: net
Installed-Size: 223012
Maintainer: Discord Maintainer Team <native-team@discord.com>
Architecture: amd64
Version: 0.0.27
Depends: libc6, libasound2, libatomic1, libgconf-2-4, libnotify4, libnspr4, libnss3, libstdc++6, libxss1, libxtst6, libc++1
Recommends: libappindicator1 | libayatana-appindicator1
Description: Chat for Communities and Friends
Discord is the easiest way to communicate over voice, video, and text. Chat,
hang out, and stay close with your friends and communities.
Homepage: https://discord.com

discord & disown
`discord` is the command to launch the Discord application.
The "&" symbol at the end of the command tells the shell to run Discord in the background, allowing you to continue using the terminal.
"disown" is used to detach the Discord process from the terminal session. This prevents the process from being terminated when you close the terminal.
After running this command, Discord should launch in the background, and you can continue using the terminal for other commands without Discord's output or messages interfering.
You got here. Way to go!

I hope this article helped you. Let me know if you have any questions. Your thoughts, suggestions and corrections are more than welcome. By the way, feel free to drop your suggestions on new blog articles.
Hope to see you next time.