Ubuntu 22.04安装vscode

要在Ubuntu 22.04安装vscode,请完成这些步骤。
首先apt命令更新软件包索引并安装导入微软GPG密钥的依赖软件。

更新,近期内执行过可忽略

sudo apt update

安装工具包

sudo apt install software-properties-common apt-transport-https curl

当导入GPG后,运行curl命令导入Microsoft GPG密钥。

curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -

执行结果如下:
在这里插入图片描述

运行add-apt-repository命令将vscode软件源添加到Ubuntu 22.04软件源列表。

sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"

最后运行apt命令安装最新版本的vscode。

sudo apt update
sudo apt install code

开始安装如图
在这里插入图片描述
等待安装完成 输入code

code

就会弹出vccode 的编辑器页面
在这里插入图片描述

至此,vscode已安装在您的Ubuntu 22.04,您可以开始使用它

猜你喜欢

转载自blog.csdn.net/hai411741962/article/details/134573331