在 Ubuntu 上安装 VSCodium
VS Code VSCodium
![](/data/attachment/album/202309/23/210544rez2940i0z590669.jpg)



> 
> 不满意 VS Code 中的遥测功能？安装 VSCodium，它是 VS Code 的 100% 开源克隆。
> 
> 
> 


[VSCodium](https://itsfoss.com/vscodium/) 是微软 VS Code 的“完全开源版本”。


它基本上是 [VS Code](https://code.visualstudio.com/) 的克隆，并去除了所有遥测痕迹。[遥测是用于收集有关应用使用情况的数据](https://code.visualstudio.com/docs/getstarted/telemetry)。许多开发人员使用它来深入了解改进他们的应用。


从外观和功能来看，这两个编辑器是相同的。


![VSCodium 与 VS Code 相同](/data/attachment/album/202309/23/210610yaraknw5kipz3d5e.png)


在 Ubuntu 上安装 VSCodium 有三种方法：


1. 从发布页面下载 deb 文件进行安装。缺点是你无法轻松更新它，因为你必须再次下载新的 deb 文件。
2. 将第三方开发者仓库添加到你的系统中（[VSCodium](https://vscodium.com/) 推荐的方式）。这样，你还可以获得 VSCodium 新版本的定期更新。
3. 使用 snap 版本。如果你不厌恶 Snap 软件包，这也许是最简单的方法。


我不会讨论第一种方法，因为它只是从 [发布页面](https://github.com/VSCodium/vscodium/releases) 下载并 [安装 deb 文件](https://itsfoss.com/install-deb-files-ubuntu/)。


我们来看看另外两种方法。


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


VSCodium 官方文档引用了 [Pavlo Rudy 的 GitLab 仓库](https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo)，它为你提供了 VSCodium 的持续更新版本。



> 
> ? 虽然我在这里使用 Ubuntu，但这些步骤应该适用于 Debian 和其他基于 Debian 和 Ubuntu 的发行版。
> 
> 
> 


以下是步骤。


[在 Ubuntu 中打开终端](https://itsfoss.com/open-terminal-ubuntu/) 并使用以下命令获取开发者的 GPG 签名密钥并将其添加到你的系统中。这样，你的 Ubuntu 系统将信任该开发人员签名的软件包。



```
sudo wget https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg -O /usr/share/keyrings/vscodium-archive-keyring.asc

```

![Adding the GPG signature key for VSCodium repository](/data/attachment/album/202309/23/210610soifdjqd3q3m3pz3.png)


下一步是将仓库添加到 [你系统的 sources.list 文件](https://itsfoss.com/sources-list-ubuntu/)。这样，你的 Ubuntu 系统就会知道应该从哪里获取包。



```
echo 'deb [signed-by=/usr/share/keyrings/vscodium-archive-keyring.asc ] https://paulcarroty.gitlab.io/vscodium-deb-rpm-repo/debs vscodium main'| sudo tee /etc/apt/sources.list.d/vscodium.list

```

![Adding the VSCodium repo to sources.list](/data/attachment/album/202309/23/210611ojj3jjq67rfbfsqq.png)


正如你所看到的，该条目中的仓库是由你在其上方添加的密钥签名的。


更新本地包缓存，以便你的系统能够识别新添加的仓库中的包。



```
sudo apt update

```

现在你已准备好在 Ubuntu 上安装 VSCodium：



```
sudo apt install codium

```

是的，该软件包名为 `codium`，而不是 `vscodium`。


![](/data/attachment/album/202309/23/210611mj4jgpq1ffb7b6qj.png)


很好！ 现在你可以在菜单中查找 “VSCodium” 并从那里启动应用：


![](/data/attachment/album/202309/23/210611q6pho6pbmhv1pbvp.png)


现在你可以在 VSCodium 中享受编码的乐趣。


#### 更新 VSCodium


好处是你已将仓库添加到系统中。当新的 VSCodium 发布时，仓库维护者会将新版本推送到仓库，你应该在系统更新程序中看到新版本。


换句话说，[保持你的 Ubuntu 系统更新](https://itsfoss.com/update-ubuntu/)，你就会拥有更新版本的 VSCodium。


#### 删除 VSCodium


如果你出于某种原因不想再使用它，可以使用以下命令将其删除：



```
sudo apt remove codium

```

你可以将仓库和签名添加到你的系统中。



> 
> ? 如果你对这些东西很在意，你也可以将它们从系统中删除。使用 sudo [在 Linux 终端中删除文件](https://itsfoss.com/delete-files-folders-linux/) 时要小心一些。
> 
> 
> 



```
sudo rm /usr/share/keyrings/vscodium-archive-keyring.asc

```

接下来，你还可以从 `sources.list` 中删除仓库：



```
sudo rm /etc/apt/sources.list.d/vscodium.list

```

你的主目录中应该有一些与应用相关的本地文件，你可能还想删除它们：



```
rm -r ~/.config/VSCodium

```

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



> 
> ? Snap 方法适用于任何 Linux 发行版，而不仅仅是 Ubuntu，只要 [你在系统上启用了 Snap 支持](https://itsfoss.com/install-snap-linux/)。
> 
> 
> 


Snap 安装方法比较简单，步骤也较少。


打开终端并使用以下命令安装 VSCodium Snap 包：



```
sudo snap install codium --classic

```

等待几秒钟，它会下载 Snap 软件包，然后进行安装。你将在屏幕上看到进度。


![](/data/attachment/album/202309/23/210612ht773dkqd6bxz36d.png)


**你如何 [更新 Snap 版本的 VSCodium](https://itsfoss.com/snap-update/)**？Snap 应用每天自动更新多次。但是，如果应用正在运行，那么不会更新。


因此，你也可以关闭任何正在运行的 VSCodium 实例并运行此命令来强制更新（如果有任何新版本）：



```
sudo snap refresh codium

```

如果你不喜欢它，可以使用以下命令轻松删除它：



```
sudo snap remove codium

```

### VS Code VS. VSCodium


主要区别在于，VSCodium 从 VS Code 中移除了遥测部分。除此之外，它就是这个微软项目的克隆版，在外观和功能上与著名的 VS Code 完全相同。


对于某些人来说，遥测可能是一个障碍，因此这个项目在开源社区中颇受欢迎。


下面是一篇关于 [VS Code 遥测问题](https://www.roboleary.net/tools/2022/04/20/vscode-telemetry.html)的好文章。



> 
> **[VS Code - 遥测技术是怎么回事？](https://www.roboleary.net/tools/2022/04/20/vscode-telemetry.html)**
> 
> 
> 


如果你能接受遥测部分，你可以 [在 Ubuntu 上轻松安装 VS Code](https://itsfoss.com/install-visual-studio-code-ubuntu/)。这确实可以是你的选择。


希望本教程对你在 Ubuntu 和其他基于 Debian 的发行版上安装 VSCodium 有所帮助。请在评论区留下你的反馈意见。


*（题图：MJ/352e50f1-3ae2-4fe2-9a32-b75d1b5f0c73）*




---


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


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

[VSCodium](https://itsfoss.com/vscodium/) is the 'complete open source version' of Microsoft's VS Code.

It's basically a clone of the [VS Code](https://code.visualstudio.com/) that removes any signs of telemetry. The [telemetry is used for collecting data](https://code.visualstudio.com/docs/getstarted/telemetry) on the usage of the application. Many developers use it to get an insight on improving their application.

Look and feature wise, the two editors are identical.

![VSCodium interface](https://itsfoss.com/content/images/2023/09/vscodium-interface.png)

There are three ways to install VSCodium on Ubuntu:

- Install it by downloading the deb file from the release page. The downside is that you cannot easily update it as you have to download the new deb file again.
- Add a third-party developer repository (recommended by
[VSCodium](https://vscodium.com/)) to your system. This way, you also get regular updates for the new releases of VSCodium. - Use the snap version. Perhaps the easiest way if you don't have an aversion to Snap packages.

I won't discuss the first method, as it is just downloading and [installing the deb file](https://itsfoss.com/install-deb-files-ubuntu/) from the [release page](https://github.com/VSCodium/vscodium/releases).

Let's see the other two methods.

## Method 1: Installing VSCodium by adding external repo

The official VSCodium documentation refers to a [GitLab repository by Pavlo Rudy](https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo) that gives you a continuous update version of VSCodium.

Here are the steps.

[Open a terminal in Ubuntu](https://itsfoss.com/open-terminal-ubuntu/) and use the following command to get the GPG signature key of the developer and add it to your system. This way, your Ubuntu system will trust the packages that are signed by this developer.

```
sudo wget https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg -O /usr/share/keyrings/vscodium-archive-keyring.asc
```


![Add the GPG signature key for VSCodium repository](https://itsfoss.com/content/images/2023/09/add-vscodium-signature-key.png)

The next step is to add the repository to [your system's sources.list file](https://itsfoss.com/sources-list-ubuntu/). This way, your Ubuntu system will know from where it should get the package from.

```
echo 'deb [ signed-by=/usr/share/keyrings/vscodium-archive-keyring.asc ] https://paulcarroty.gitlab.io/vscodium-deb-rpm-repo/debs vscodium main' | sudo tee /etc/apt/sources.list.d/vscodium.list
```


![Adding the VSCodium repo to sources.list in Ubuntu](https://itsfoss.com/content/images/2023/09/add-vscodium-repo-ubuntu.png)

As you can see, the entry mentions that the repository is signed by the key you had added just above it.

Update the local package cache so that your system is aware of the packages from the newly added repository.

`sudo apt update`


Now you are ready to install VSCodium on Ubuntu:

`sudo apt install codium`


Yes, the package is called `codium`

, not `vscodium`

.

![](https://itsfoss.com/content/images/2023/09/install-vscodium-ubuntu.png)

Great! Now you can look for VSCodium in the menu and start the application from there:

![](https://itsfoss.com/content/images/2023/09/vscodium-ubuntu.png)

And now you can enjoy coding in VSCodium.

### Updating VSCodium

The good thing is that you have added a repository to your system. When a new VSCodium is released, the repository maintainer pushes the new version to the repository and you should see the new version in the system updater.

In other words, [keep your Ubuntu system updated](https://itsfoss.com/update-ubuntu/) and you should have the newer version of VSCodium.

### Removing VSCodium

If you don't want to use it any more for some reason, you can remove it using this command:

`sudo apt remove codium`


You may keep the repository and signature added to your system.

[deleting file in the Linux terminal](https://itsfoss.com/delete-files-folders-linux/)with sudo.

`sudo rm /usr/share/keyrings/vscodium-archive-keyring.asc`


Next, you could also remove the repository from the sources.list:

`sudo rm /etc/apt/sources.list.d/vscodium.list`


There should be some local, application related files in your home directory, you may want to delete them as well:

`rm -r ~/.config/VSCodium`


## Method 2: Install VSCodium using snap

[you have snap support enabled on the system](https://itsfoss.com/install-snap-linux/).

The snap installation method is rather easier and involves less steps.

Open a terminal and use the following command to install VSCodium snap package:

`sudo snap install codium --classic`


Wait for some seconds as it downloads the Snap package and then installs it. You'll see the progress on the screen and

![Install VSCodium using Snap in Ubuntu](https://itsfoss.com/content/images/2023/09/snap-install-codium.png)

**How do you **? Snap applications are updated automatically multiple times a day. However, the application won't be updated if it's running.

**update the snap version**of VSCodium

So, alternatively, you can close any running instance of VSCodium and run this command to force an update (if there is any new version):

```
sudo snap refresh codium
```


If you don't like it, you can easily remove it with the command below:

```
sudo snap remove codium
```


## VS Code VS VSCodium

The major difference is that VSCodium removes the telemetry part from the VS Code. Otherwise, it's a clone of the Microsoft's project and looks and works identical to the famous VS Code.

The telemetry could be a dealbreaker for some, and hence this project has a considerable popularity in the open source community.

Here's a good take on the [VS Code telemetry issue](https://www.roboleary.net/tools/2022/04/20/vscode-telemetry.html).

[VS Code - What’s the deal with the telemetry?VS Code collects telemetry data to help understand Microsoft how to improve the product. Is it above board? Can I turn it off completely?](https://www.roboleary.net/tools/2022/04/20/vscode-telemetry.html)![](https://www.roboleary.net/assets/img/blog/2022-04-20-vscode-whats-the-deal-with-telemetry/cover.jpg)


![](https://www.roboleary.net/assets/img/blog/2022-04-20-vscode-whats-the-deal-with-telemetry/cover.jpg)

If you are okay with the telemetry part, you can [install VS Code on Ubuntu as easily](https://itsfoss.com/install-visual-studio-code-ubuntu/). It's really your choice.

I hope you find this tutorial helpful in installing VSCodium on Ubuntu and other Debian-based distributions. Please leave your feedback in the comment sections.