20.04Ubuntu搭建Vscode

1、以 sudo 用户身份运行下面的命令,更新软件包索引,并且安装依赖软件:

复制代码
sudo apt update
sudo apt install software-properties-common apt-transport-https wget

2、使用 wget 命令插入 Microsoft GPG key :

复制代码
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -

3、启用 Visual Studio Code 源仓库,输入:

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

4、安装 Visual Studio Code 软件包:

复制代码
sudo apt install code

5、当一个新版本被发布时,你可以通过你的桌面标准软件工具,或者在你的终端运行命令,来升级 Visual Studio Code 软件包:

复制代码
sudo apt update
sudo apt upgrade

启动 Visual Studio Code

如果遇到以下问题,记得要先退出sudo再运行

You are trying to start Visual Studio Code as a super user which isn't recommended. If this was intended, please add the argument `--no-sandbox` and specify an alternate user data directory using the `--user-data-dir` argument.

cd路径到你想打开的文件夹,输入code .

(注意有个. )

相关推荐
csdn_aspnet3 分钟前
如何从电脑主机拷东西到VWmare虚拟机
linux·运维·服务器·windows·vmware·虚拟机
Vcaker17 分钟前
Linux学习28-Kubernetes service
linux·运维·学习
微软技术分享18 分钟前
基于 HuggingFace Tokenizers 训练自定义分词器
python·ubuntu·大模型·huggingface
有梦想的咕噜32 分钟前
Newtonsoft.Json (Json.NET) 常用方法汇总
linux·json·.net
码农小韩37 分钟前
Linux应用开发(五)——线程
linux·操作系统·linux驱动·嵌入式软件开发·嵌入式操作系统·linux应用
Polevne40 分钟前
C# GRPC 一元与双向流
linux·算法·c#
拂拉氏43 分钟前
【知识讲解】 Linux程序替换相关接口讲解
linux·程序替换
星源~1 小时前
zephyr-Linux环境下搭建步骤
linux·mcu·嵌入式开发·zephyr
Huangjin007_1 小时前
【Linux 系统篇(二十)】进程(八):进程创建、进程退出
linux·运维·服务器
吴声子夜歌1 小时前
Shell编程——开发规范
linux·运维·shell