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 .

(注意有个. )

相关推荐
不昀4 小时前
网口Link Up后仍然掉线,怎样区分物理链路和数据通路问题?
linux·以太网
Lhan.zzZ4 小时前
Qt WebEngineView 在 Linux 上无法加载网页:从“看不见 HTML“到“禁用沙箱“
linux·c++·qt
Fcy6486 小时前
Linux下 多路转接select详解
linux·select·多路转接
无足鸟ICT6 小时前
【RHCA+】RPM包命名规则
linux·运维·服务器
Zucker n7 小时前
一款适合研究生科研工作安排的日历
linux·数据库·python
爱吃香菜的初学者7 小时前
十六.Linux——多线程(2)
linux·运维·开发语言
荒--8 小时前
Ubuntu软件包查询,弹框下载文件
运维·服务器·ubuntu
‎ദ്ദിᵔ.˛.ᵔ₎8 小时前
Linux:对有关 SIGCHLD 的深层理解
linux·运维·服务器
aichitang20249 小时前
QCU 2.0.0:补齐 Windows、Linux 与 GNOME Wayland
linux·运维·windows·ai·agent·ai编程