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 .

(注意有个. )

相关推荐
123过去2 小时前
hashid使用教程
linux·网络·测试工具·安全
C+++Python2 小时前
Linux/C++多进程
linux·运维·c++
Stack Overflow?Tan902 小时前
linux ubuntu22.04安装ROS2humble完整版的流程
linux·docker·ros2
zly35003 小时前
centos7 sshd无法启动
linux·运维·服务器
IMPYLH3 小时前
Linux 的 hostid 命令
linux·运维·服务器·bash
编程大师哥4 小时前
Linux 命名管道(FIFO)通信 超清晰讲解
linux·运维·服务器
Smile_2542204184 小时前
linux服务器清理磁盘
linux·运维·服务器
KivenMitnick4 小时前
Claude Code--Ubuntu Linux超详细配置教程(附每步的可能报错及解决方法)
linux·运维·ubuntu
H@Z*rTE|i4 小时前
vscode 安装配置claudeCode 配置美团免费模型LongCat-Flash-Thinking-2601的每天500000token 保姆级教程
ide·vscode·编辑器
panamera124 小时前
linux下SPI、IIC、UART、CAN的编码
linux·运维·服务器