如何在 Fedora Linux 上安装 Discord
Discord
![](/data/attachment/album/202111/27/115501g3oiuirvzk4nvu3k.jpg)


[Discord](https://discord.com/) 是一个流行的消息收发应用，可用于文字和语音信息传递。


它是一些社区的福音，可以帮助他们扩大项目，接触更多的人，并维持一个粉丝和关注者的社区。而 Discord 最初是为游戏玩家设计的，这很令人惊讶。


Discord 可用于各种平台，包括 Linux。在本教程中，我将引导你完成在 Fedora 中安装 Discord 的步骤。


* 使用 DNF 和 RPM Fusion 仓库安装 Discord
* 通过 Flatpak 安装Discord


Flatpak 软件包是沙盒的，因此需要更多的磁盘空间和时间来启动。然而，他们会相当快地更新到新的版本。


无论你想使用 Flatpak 还是 DNF，选择权在你手上。我将向你展示这两种方法。



> 
> 非 FOSS 警报！
> 
> 
> Discord 并不是开源的。但由于他们提供了一个 Linux 客户端，而且许多 Linux 用户都依赖它，所以我们会在这里介绍它。
> 
> 
> 


### 方法 1：通过 RPM Fusion 仓库安装 Discord


Discord 可以通过添加非自由的 RPM Fusion 仓库来安装，这是大多数 Fedora 用户的首选方法，因为更新很容易，而且应用的启动速度比 Flatpak 版本快。


打开终端，使用下面的命令来添加 RPM-fusion 非自由仓库：



```
sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm


```

完成后，更新仓库列表（应该不需要，但只是为了它）：



```
sudo dnf update

```

然后通过 `dnf` 命令安装 Discord，像这样：



```
sudo dnf install discord

```

![Installing Discord using DNF](/data/attachment/album/202111/27/115509j7lklake7bavrlwh.png)


如果被要求导入 GPG 密钥，只要按 `Y` 就可以授权了。


![Authorize GPG key](/data/attachment/album/202111/27/115509jaj23hvw2vwkhnal.png)


这就完成了！现在你可以从应用菜单中启动 Discord。你的登录页面将看起来像这样：


![Launch Discord application](/data/attachment/album/202111/27/115510g5pux8putqvsplww.png)


#### 通过 DNF 删除 Discord


如果你不想再使用 Discord，你可以从你的系统中删除它。要做到这一点，在终端运行以下命令：



```
sudo dnf remove discord

```

这真的很简单，不是吗？还有一种简单的安装 Discord 的方法，那就是使用 Flatpak 软件包。


### 方法 2：通过 Flatpak 安装 Discord


Discord 可以使用 Flatpak 轻松安装，因为它在 Fedora 中是默认可用的。


首先，你需要在 Fedora 中启用 Flatpak 仓库：



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

```

接下来，通过这个命令安装 Discord：



```
flatpak install discord

```

![Install Discord via Flatpak](/data/attachment/album/202111/27/115510i00o2c35zcqh2hea.png)


如果你想删除 Discord，那么只需运行：



```
flatpak remove discord

```

这就超级简单了。如果你在 Fedora Linux 上安装 Discord 需要任何帮助，请告诉我。




---


via: <https://itsfoss.com/install-discord-fedora/>


作者：[Pranav Krishna](https://itsfoss.com/author/pranav/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[geekpi](https://github.com/geekpi) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
![Warp Terminal](/assets/images/warp-terminal.webp)


![Warp Terminal](/assets/images/warp-terminal.webp)

[Discord](https://discord.com/?ref=itsfoss.com) is a popular messaging application, which can be used for text and voice messaging.

It is a boon to several communities, which helps them to expand their projects, reach out to more people, and maintain a community of fans and followers. It’s surprising considering that Discord was originally meant for gamers.

Discord is available for various platforms, including Linux. In this tutorial, I’ll walk you through the steps for installing Discord in Fedora.

- Installing Discord using DNF and RPM Fusion Repository
- Installing Discord via Flatpak

The Flatpak packages are sandboxed and hence take more disk space and time to start. However, they get updated for newer version releases fairly quickly.

The choice is really yours if you want to use Flatpak or DNF. I’ll show both methods to you.

**Non-FOSS Warning!**Discord application is not open source. But since they provide a Linux client and many Linux users rely on it, it’s been covered here.

## Method 1: Installing Discord via RPM Fusion Repository

Discord can be installed by adding the nonfree RPM Fusion repository, which is the preferred method of most Fedora users, since updating is easy and the application starts up faster than the Flatpak version.

Open a terminal and use the following command to add the RPM-fusion non-free repository:

`sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm`


Once you’re done with it, update the repository list (should not be needed but just for the sake of it):

`sudo dnf update`


Then install Discord via DNF command like this:

`sudo dnf install discord`


![install discord dnf](https://itsfoss.com/content/images/wordpress/2021/11/install-discord-dnf-800x525.png)

If asked for importing a GPG key, just authorize it by pressing ‘Y’

![authorize gpg key 1](https://itsfoss.com/content/images/wordpress/2021/11/authorize-gpg-key-1-800x573.png)

That is it! Now you can launch Discord from the app menu. Your login screen will look like this:

![discord 2](https://itsfoss.com/content/images/wordpress/2021/11/Discord-2-800x432.png)

### Remove Discord via DNF

If you don’t want to use Discord anymore, you can remove it from your system. To do that, run the following command in the terminal:

`sudo dnf remove discord`


It’s really simple, isn’t it? There is another simple way of installing Discord and that is to use Flatpak packages.

## Method 2: Installing Discord via Flatpak

Discord can be installed easily using Flatpak since it is available by default in Fedora.

First, you need to enable Flatpak repository in Fedora:

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


Next, install Discord via this command:

`flatpak install discord`


![install discord flatpak](https://itsfoss.com/content/images/wordpress/2021/11/install-discord-flatpak-800x545.png)

If you want to remove Discord, then just run:

`flatpak remove discord`


That’s super easy. Let me know if you need any more help for installing Discord on Fedora Linux.

And if you manage Discord servers, check out these [Discord bots](https://itsfoss.com/open-source-discord-bots/).

[10 Best Open Source Bots for Your Discord ServerLooking for open-source Discord bots to boost the functionality of your Discord server? We have curated this list for you.](https://itsfoss.com/open-source-discord-bots/)![](https://itsfoss.com/content/images/wordpress/2022/11/best-open-source-discord-bots.png)


![](https://itsfoss.com/content/images/wordpress/2022/11/best-open-source-discord-bots.png)