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 .

(注意有个. )

相关推荐
Fanche4045 分钟前
MySQL 8 自动安装脚本(CentOS-7 系统)
linux·运维·数据库·mysql·centos
W_kiven1 小时前
Centos安装Dockers+Postgresql13+Postgis3.1
linux·运维·docker·postgresql·centos
liulilittle1 小时前
FTTR 全屋光纤架构分享
linux·服务器·网络·ip·通信·光纤·fttr
niuTaylor3 小时前
从入门到精通:CMakeLists.txt 完全指南
linux·服务器·cmake
跳跳糖炒酸奶5 小时前
第十五讲、Isaaclab中在机器人上添加传感器
人工智能·python·算法·ubuntu·机器人
SuperW6 小时前
Linux学习——UDP
linux·学习·udp
菜狗想要变强7 小时前
Linux驱动开发--异步通知与异步I/O
linux·运维·驱动开发
SuperW7 小时前
Linux学习——IO多路复用知识
linux·服务器·学习
阿桨8 小时前
【(保姆级教程)Ubuntu24.10下部署Dify】
ubuntu·dify·智能体
CopyLower8 小时前
Spring Boot的优点:赋能现代Java开发的利器
java·linux·spring boot