Visual Studio Code 是一个免费的开源跨平台 IDE 或代码编辑器,它使开发人员能够使用 C、C++、Python、Go 和 Java 开发应用程序和编写代码。它是一个非常受欢迎的代码编辑器,这要归功于其简洁且用户友好的 UI 以及广泛的功能选择和众多扩展其功能的插件。
在 Linux Mint 21 Vanessa 上安装 Visual Studio Code
apt
步骤 1. 在运行下面的教程之前,重要的是通过在终端中运行以下命令来确保您的系统是最新的:
sudo apt update sudo apt install software-properties-common apt-transport-https wget ca-certificates gnupg2
步骤 2. 在 Linux Mint 21 上安装 Visual Studio Code。
默认情况下,VS Code 在 Linux Mint 21 基础存储库中不可用。现在我们使用以下命令将 Visual Studio Code 存储库添加到您的系统:
echo deb [arch=amd64 signed-by=/usr/share/keyrings/vscode.gpg] https://packages.microsoft.com/repos/vscode stable main | sudo tee /etc/apt/sources.list.d/vscode.list
接下来,导入 GPG 密钥:
sudo wget -O- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /usr/share/keyrings/vscode.gpg
现在首先更新包列表并使用以下命令安装 Visual Studio Code stable:
sudo apt update
sudo apt install code
输出:
Reading package lists
... Done Building dependency tree... Done Reading state information... Done The following packages were automatically installed and are no longer required: python3-cliapp python3-ttystatus Use 'sudo apt autoremove' to remove them. The following NEW packages will be installed: code0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 85.8 MB of archives. After this operation, 368 MB of additional disk space will be used. Get:1 https://packages.microsoft.com/repos/vscode stable/main amd64 code amd64 1.69.2-1658162013 [85.8 MB] Ign:1 https://packages.microsoft.com/repos/vscode stable/main amd64 code amd64 1.69.2-1658162013 Get:1 https://packages.microsoft.com/repos/vscode stable/main amd64 code amd64 1.69.2-1658162013 [85.8 MB] Fetched 48.0 MB in 18min 12s (49.4 kB/s) Selecting previously unselected package code.(Reading database ... 363939 files and directories currently installed.) Preparing to unpack .../code_1.69.2-1658162013_amd64.deb ... Unpacking code (1.69.2-1658162018) ... Setting up code (1.69.2-1658162018) ... Processing triggers for gnome-menus (3.36.0-1ubuntu3) ... Processing triggers for shared-mime-info (2.1-2) ... Processing triggers for mailcap (3.70+nmu1ubuntu1) ... Processing triggers for desktop-file-utils (0.26+mint1+vanessa) ...
步骤 3. 在 Linux Mint 21 上访问 Visual Studio Code。
安装完成后,我们将在 Mint 菜单的 Programming 部分中找到 Visual Studio Code,或者您可以借助如下所示的命令通过终端启动它:
code
感谢您使用本教程在 Linux Mint 系统上安装最新版本的 Visual Studio Code。如需更多帮助或有用信息,我们建议您查看官方 VS Code 网站。
原创文章,作者:校长,如若转载,请注明出处:https://www.yundongfang.com/Yun224357.html