如何在 Fedora 上安装 VSCodium
VSCodium VS Code
![](/data/attachment/album/202311/26/134531enn7h0bn7z97977b.png)



> 
> VSCodium 是微软 VS Code 真正开源的版本，它可以轻松安装在 Fedora 上。具体方法如下。
> 
> 
> 


Visual Studio Code（VS Code）是微软开发的一款流行的跨平台文本编辑器。它基于 Electron 框架构建，被开发人员广泛用于编码和文本编辑任务。VS Code 的核心，称为 “Code - OSS”，是开源的，并在 MIT 许可证下分发。然而，微软添加了特定的自定义功能，并在专有许可下发布了其品牌版本的编辑器。


为了解决有关 [遥测](https://code.visualstudio.com/docs/getstarted/telemetry) 和许可的问题，有一个名为 “[VSCodium](https://itsfoss.com/vscodium/)” 的替代方案，它是社区驱动、禁用遥测且获得 MIT 许可的 VS Code 版本。


![VSCodium running on Fedora 39](/data/attachment/album/202311/26/134616jdfzytfzetd0aa0z.png)


在本教程中，我将指导你完成在 Fedora Linux 系统上安装和运行 VSCodium 的过程。


有三种方法可以做到这一点：


1. 从发布页面下载 rpm 文件进行安装。但是，你需要重复该过程才能更新软件包（这可能会令人沮丧）。
2. 添加 [paulcarroty](https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo) 仓库（如 [VSCodium](https://vscodium.com/) 网站所述）。因此，当你 [更新你的 Fedora 系统](https://itsfoss.com/update-fedora/) VScodium 也会得到更新（这是相当无缝的）。
3. 使用 flatpak 版本，你可能已经尝试过从 GNOME “软件”中安装该版本（我有过同样的糟糕经历，因此可能会有所不同）。


第一个非常简单，即从 [发布页面](https://github.com/VSCodium/vscodium/releases) 下载并 [安装 RPM 文件](https://itsfoss.com/install-rpm-files-fedora/)。那么，让我们切入主题并遵循其他两种方法。


### 方法 1：通过添加仓库来安装 VSCodium


打开终端：你可以通过在应用菜单中搜索 “Terminal” 来打开终端。


添加 GPG 密钥：以便包管理器信任仓库的打包者。



```
sudo rpmkeys --import https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/-/raw/master/pub.gpg

```

添加 VSCodium 仓库：以下命令会将仓库添加到你的 Fedora 系统。



```
printf "[gitlab.com_paulcarroty_vscodium_repo]\nname=download.vscodium.com\nbaseurl=https://download.vscodium.com/rpms/\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=https://gitlab .com/paulcarroty/vscodium-deb-rpm-repo/-/raw/master/pub.gpg\nmetadata_expire=1h" | sudo tee -a /etc/yum.repos.d/vscodium.repo


```

安装VSCodium：现在你已经添加了 VSCodium 存储库，你可以使用以下命令安装它（喜欢前沿软件的人可以将软件包名称替换为 **codium-insiders** 来安装 insider 版本）：



```
sudo dnf install codium

```

启动 VSCodium：你现在可以从应用菜单或在终端中运行以下命令来启动 VSCodium：



```
codium

```

#### 删除 VSCodium


如果你不喜欢 VSCodium 以及它基于 Electron 的事实，或者改用 Neovim。你可以使用以下命令删除它：



```
sudo dnf remove codium

```

你可以将仓库和签名添加到你的系统中，也可以不保留（为什么不）。


因此，让我们摆脱该仓库：



```
sudo rm /etc/yum.repos.d/vscodium.repo

```

### 方法 2：使用 Flatpak 安装 VSCodium


你也可以安装 Flatpak。因此，以下是在 Fedora 上使用 Flatpak 安装 VSCodium 的步骤：


你可以通过启用 Flathub 直接在 Fedora 上安装它，如果你使用的是最新版本之一并且为 Fedora 启用了第三方仓库，那么可能会启用该功能。只需在 GNOME “软件” 应用中搜索 VSCodium 并单击安装即可。


![Installing the flatpak from Gnome Software](/data/attachment/album/202311/26/134616f14ohj2p9dohmvoh.png)


不过，由于某些原因运行旧版本的用户，或者他们可能有一个未启用 Flatpak 的分叉，也可以效仿。


安装 Flatpak 并启用 Flathub：Fedora 通常预装了 Flatpak。如果尚未安装，你可以使用以下命令进行安装：



```
sudo dnf install flatpak

```

要启用 Flathub 仓库，请使用以下命令：



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

```

现在你已经设置了 Flatpak，你可以使用 Flathub 仓库安装 VSCodium。运行以下命令：



```
flatpak install flathub com.vscodium.codium

```

启动 VSCodium：你可以使用以下命令通过 Flatpak 启动 VSCodium：



```
flatpak run com.vscodium.codium

```

或者，你也可以在应用菜单中搜索 “VSCodium” 并从那里启动它。


就是这样！ 你现在应该已经使用 Flatpak 在 Fedora 系统上安装并运行了 VSCodium。


要删除它，请使用以下命令：



```
sudo flatpak uninstall com.vscodium.codium

```

### 附言


如果你使用过 VS Code，那么你不会发现这两个软件之间有任何区别。这只是为了开放和免受微软版本的邪恶遥测的影响。


在 Fedora，我首先安装了 Flatpak 版本，但在 Wayland 会话中，VSCodium 没有显示任何窗口装饰（这显然是默认的）。这让我很难用鼠标导航。


![VSCodium flatpak showing no window decorations.](/data/attachment/album/202311/26/134617m5mvamplv7aba5lk.png)


我尝试了一些方法来解决这个问题，但由于 Fflatpak 配置文件的位置很奇怪，所以没有成功。如果有人有或能找到解决上述问题的办法，请在下面发表评论。不过，使用 rpm 版本倒是天衣无缝（也许怀疑论者对替代软件包管理系统的看法是对的）。


扩展和插件在大部分情况下都没有问题。你也可以按照本教程在企业 Linux 系列的任何发行版（如 Alma Linux、Rocky Linux 等）上安装。


*（题图：MJ/5f39d386-d28c-4b3d-97a8-b498290d54f7）*




---


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


作者：[Anuj Sharma](https://itsfoss.com/author/anuj/) 选题：[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)

Visual Studio Code (VS Code) is a popular cross-platform text editor developed by Microsoft. It's built on the Electron framework and is widely used by developers for coding and text editing tasks. The core of VS Code, known as "Code - OSS," is open source and distributed under the MIT License. However, Microsoft adds specific customizations and releases its branded version of the editor under a proprietary license.

To address concerns about [telemetry](https://code.visualstudio.com/docs/getstarted/telemetry?ref=itsfoss.com) and licensing, there's an alternative called "[VSCodium](https://itsfoss.com/vscodium/)," which is a community-driven, telemetry-disabled, and MIT-licensed version of VS Code.

![](https://itsfoss.com/content/images/2023/10/codium-on-fedora.png)

In this tutorial, I will guide you through the process of installing and running VSCodium on a Fedora Linux system.

There are three ways to do that:

- Installing by downloading the rpm file from the release page. But, you need to repeat the process to get the package updated (which can get frustrating).
- Adding
[paulcarroty](https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo?ref=itsfoss.com)repo (as mentioned on[VSCodium](https://vscodium.com/?ref=itsfoss.com)website). So, that when you[update your Fedora system](https://itsfoss.com/update-fedora/)VScodium will also get updated (which is quite seamless). - Using the flatpak version which you probably have tried by installing it from Gnome software already (I had a bad experience with the same so mileage may vary).

The first one is very straightforward i.e. downloading and [installing the rpm file](https://itsfoss.com/install-rpm-files-fedora/) from the [release page](https://github.com/VSCodium/vscodium/releases?ref=itsfoss.com). So, let's cut to the chase and follow the other two methods.

## Method 1: Installing VSCodium by adding the repository

Open a terminal: You can open a terminal by searching for "Terminal" in the application menu.

Add the GPG key: So that the package manager trusts the packager of the repo.

```
sudo rpmkeys --import https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/-/raw/master/pub.gpg
```


Add the VSCodium repository: The following command will add the repo to your Fedora system.

```
printf "[gitlab.com_paulcarroty_vscodium_repo]\nname=download.vscodium.com\nbaseurl=https://download.vscodium.com/rpms/\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/-/raw/master/pub.gpg\nmetadata_expire=1h" | sudo tee -a /etc/yum.repos.d/vscodium.repo
```


Install VSCodium: Now that you've added the VSCodium repository, you can install it using the following command (ones who love bleeding edge software can replace the package name to **codium-insiders** for installing the insiders version):

```
sudo dnf install codium
```


Launch VSCodium: You can now launch VSCodium either from the application menu or by running the following command in the terminal:

`codium`


### Removing VSCodium

If you did not like VSCodium and the fact that it's based on Electron or maybe you switched to Neovim for good. You can remove it using this command:

`sudo dnf remove codium`


You may keep the repository and signature added to your system or maybe not (why not).

So, let's get rid of that repo:

`sudo rm /etc/yum.repos.d/vscodium.repo`


## Method 2: Install VSCodium using flatpak

You can install the flatpak also. So, here are the steps to install VSCodium using Flatpak on Fedora:

You can Install it straight away on Fedora by having flathub enabled which is probably enabled if you are using one of the latest iterations and have 3rd party repos enabled for Fedora. Just search for VSCodium in Gnome Software and click Install.

![](https://itsfoss.com/content/images/2023/10/codium-flatpak-fedora.png)

But, for the folks running older versions for some reason or they might have a fork with flatpak not enabled can follow suit.

Install Flatpak and enable Flathub: Fedora usually comes with Flatpak pre-installed. If it's not installed, you can install it using the following command:

`sudo dnf install flatpak`


To enable the Flathub repository, use the following command:

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


Now that you have Flatpak set up, you can install VSCodium using the Flathub repository. Run the following command:

```
flatpak install flathub com.vscodium.codium
```


Launch VSCodium: You can launch VSCodium via Flatpak using the following command:

`flatpak run com.vscodium.codium`


Alternatively, you can also search for "VSCodium" in your application menu and launch it from there.

That's it! You should now have VSCodium installed and running on your Fedora system using Flatpak.

To remove it use the command below:

`sudo flatpak uninstall com.vscodium.codium`


## Here comes the Bottomline

If you have used VS Code then you will not find any difference whatsoever between both the software. It is just for the sake of openness and freedom from the evil telemetry of Microsoft's version.

Coming to Fedora I installed the flatpak version first but VSCodium did not show any window decorations in the Wayland session (which is default obviously). Making it difficult to navigate using mouse.

![](https://itsfoss.com/content/images/2023/10/codium-flatpak-no-decorations.png)

I tried some methods to fix it but had no luck due to flatpak's weird locations for config files. If someone has or can figure out the workaround for above issue can comment down below. But using the rpm version was seamless (Maybe the skeptics were right about alternative package management systems).

Extensions and Plugins were fine for most of the part. You can also follow this tutorial to install on any distro from The Enterprise Linux family e.g. Alma Linux, Rocky Linux etc.