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 .

(注意有个. )

相关推荐
努力的小帅21 小时前
Linux_进程信号(Linux入门到精通)
linux·信号处理·信号捕捉·进程控制·linux入门
秋4271 天前
ansible剧本
linux·服务器·ansible
oMcLin1 天前
Linux系统的香港服务器性能调优指南:从 CPU、内存到 I/O
linux·运维·服务器
Lueeee.1 天前
Linux 字符设备驱动中 “主次设备号的静态 / 动态分配” 实验
linux
不爱学习的笨蛋1 天前
ubuntu安装gitlab
linux·ubuntu·gitlab
QQ__17646198241 天前
Ubuntu系统克隆Github仓库项目到本地
linux·ubuntu·github
坚持的小马1 天前
启动NameServer集群
linux·运维·网络
浩泽学编程1 天前
内网开发?系统环境变量无权限配置?快速解决使用其他版本node.js
前端·vue.js·vscode·node.js·js
一只大侠的侠1 天前
Linux实战:动态进度条从零实现,多版本优化与缓冲区原理全解析
linux·运维·服务器
奔跑吧 android1 天前
【ubuntu】【unattended-upgrades 介绍】
服务器·数据库·ubuntu