How to Install Visual Studio Code on Ubuntu 20.04
https://code.visualstudio.com/download
https://visualstudio.microsoft.com/zh-hans/free-developer-offers/
How to Install Visual Studio Code on Ubuntu 20.04
Posted May 1, 2020
•3 min read

Visual Studio Code is cross-platform, available on Windows, Linux, and macOS.
This guide shows two ways of installing Visual Studio Code on Ubuntu 20.04. VS Code can be installed as a snap package via the Snapcraft store or as a deb package from Microsoft repositories.
Choose the installation method that is most appropriate for your environment.
Installing Visual Studio Code as a Snap Package
Visual Studio Code snap package is distributed and maintained by Microsoft.
Snaps are self-contained software packages that include the binary all dependencies needed to run the application. Snap packages are easy to upgrade and secure. Unlike the standard deb packages, snaps have a larger disk footprint and longer application startup time.
Snap packages can be installed from either the command-line or via the Ubuntu Software application.
To install the VS Code snap, open your terminal (Ctrl+Alt+T
) and run the following command:
sudo snap install --classic code
That’s it. Visual Studio Code has been installed on your Ubuntu machine.
If you prefer using a GUI, open Ubuntu Software, search for “Visual Studio Code” and install the application:

Whenever a new version is released, Visual Studio Code package will be automatically updated in the background.
Installing Visual Studio Code with apt
Visual Studio Code is available from the official Microsoft Apt repositories. To install it, follow the steps below:
-
Update the packages index and install the dependencies by running the following command as a user with sudo privileges :
sudo apt update sudo apt install software-properties-common apt-transport-https wget
-
Import the Microsoft GPG key using the following
wget
command :wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
And enable the Visual Studio Code repository by typing:
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
-
Once the apt repository is enabled , install the Visual Studio Code package:
sudo apt install code
When a new version is released you can update the Visual Studio Code package through your desktop standard Software Update tool or by running the following commands in your terminal:
sudo apt update
sudo apt upgrade
Starting Visual Studio Code
In the Activities search bar type “Visual Studio Code” and click on the icon to launch the application.
When you start VS Code for the first time, a window like the following should appear:

You can now start installing extensions and configuring VS Code according to your preferences.
VS Code can also be launched from the command line by typing
code
.
Conclusion
We’ve explained how to install VS Code on Ubuntu 20.04.
You can now start installing new extensions and customizing your workspace. To learn more about VS Code visit their official documentation page.
If you have any questions, please leave a comment below.
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· Docker 太简单,K8s 太复杂?w7panel 让容器管理更轻松!
2022-07-09 总结安卓各大版本(1.0-11.0)的区别、新特性
2022-07-09 2022 从零开始写一个RTSP服务器系列
2022-07-09 ARM汇编指令
2022-07-09 2022 linux触摸屏(一)编写触摸屏应用 &linux触摸屏(二)使用tslib
2022-07-09 2022 linux I2C设备驱动
2022-07-09 (超级详细)一文看懂指针、地址、引用
2022-07-09 一文带你读懂指针