Install Visual Studio Code on Ubuntu: Step-by-Step Guide

Richard
Written byRichardTech Writer, IT Professional
May 25, 2022 Updated Apr 17, 2026 2 min read Reviewed Apr 17, 2026

This guide helps students and new users install Microsoft Visual Studio Code (VS Code) on Ubuntu Linux. VS Code is a powerful, open-source code editor. It is fast and works on many different computer systems.

Why use VS Code? It helps you write code faster with smart suggestions. It also tracks your changes using Git. What happens when you are done? You will have a professional tool ready to build your own apps.

How to install VS Code on Ubuntu Linux

You can install VS Code using one of the two methods below. Most users prefer the first method.

Method 1: Installing via Snap (Recommended)

The easiest way to get VS Code is through the Snap Store. It updates automatically.

  1. Open your terminal.
  2. Run this command: sudo snap install code --classic

Method 2: Installing via APT Repository

If you prefer using the standard package manager, follow these steps.

First, check your system architecture to ensure compatibility: dpkg --print-architecture. Most modern systems use amd64.

Install the necessary helper tools:

sudo apt update && sudo apt install wget gpg

Now, import the Microsoft GPG key to your keyring folder:

wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg

Next, add the repository source file for your Ubuntu system:

echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" | sudo tee /etc/apt/sources.list.d/vscode.list > /dev/null

Finally, update your package list and install the editor:

sudo apt update
sudo apt install code

VS Code is now installed. You can find it in your application menu.

Post-Installation

Once you open VS Code for the first time, we recommend installing a few extensions to improve your experience. Go to the Extensions view by clicking the square icon on the left sidebar.

  • Remote Development pack: Allows you to code on remote machines or inside containers.
  • GitHub Copilot: Uses AI to help you write code faster.

Conclusion

Visual Studio Code is a versatile, feature-rich code editor compatible with various platforms. Git control, syntax highlighting, and code completion are among the features supported by VS Code. By following these steps, developers can seamlessly install and utilize VS Code for their coding projects.

Richard2454 articles

About the Author

Richard

Tech Writer, IT Professional

Richard, the owner and lead writer at Geek Rewind, is a tech enthusiast passionate about simplifying complex IT topics. His years of hands-on experience in system administration and enterprise IT operations have honed his ability to provide practical insights and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

Expertise:Windows 11Ubuntu LinuxCMSApps and Browsers
View all articles by Richard →

Categories:

Leave a Reply

Your email address will not be published. Required fields are marked *