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 .

(注意有个. )

相关推荐
山上三树3 分钟前
MMU与页表
linux·嵌入式硬件
yueguangni30 分钟前
centos7虚拟机nat模式连接不上xshell方法分享
linux·运维·服务器
wadesir32 分钟前
解决VSCodeServer在CentOS 7上运行问题:glibc 2.17升级与内核优化指南(2025最新版)
linux·运维·centos
Hello_wshuo41 分钟前
锅炉温控系统优化
linux·python·物联网
HuaYi_Sir1 小时前
i.MX6ULL移植uboot Linux buildroot(二)
linux·运维·服务器
小鹏linux2 小时前
【像素贪吃蛇小游戏】部署文档-linux篇
linux·运维·服务器
DD-WL2 小时前
PKI&&数字证书相关概念
linux·网络协议
路溪非溪2 小时前
Linux驱动中的红外遥控子系统
linux·arm开发·驱动开发
成都犀牛2 小时前
Ubuntu配置nginx
linux·nginx·ubuntu
qdprobot3 小时前
开源的在线串口调试助手支持macOS苹果电脑Windows系统Linux 浏览器webSerial
linux·运维·服务器·人工智能·mixly·小智ai·webserial