How to install Visual Studio Code on Linux

Microsoft Visual Studio Code editor is available on Linux, and these are the steps to install the app on Ubuntu.

Install Visual Studio Code on Linux
Install Visual Studio Code on Linux

If you’re a developer who requires the use of Linux, such as Ubuntu, to work from home of office, you can now install the Microsoft Visual Studio Code (VS Code) as your lightweight code editor.

The VS Code editor includes, support for Node.js, JavaScript, TypeScript, and support can be extended to many other languages, including PHP, Python, Go, Java, C#, and C++. In addition, you can also install extensions for runtimes, such as Unity and .NET.

In this guide, you’ll learn the steps to install VS Code on Linux using GUI and the Terminal. (You can also install the code editor on Windows 10 using these steps.)

How to install Visual Studio Code using GUI on Ubuntu

To download and install Visual Studio Code, use these steps:

  1. Open Visual Studio Code page.

  2. Click the .deb button to download the Ubuntu installer.

    Download VS Code installer
    Download VS Code installer
  3. Save the file to your device.

  4. Double-click the *.deb file to launch the installer.

    VS Code deb installer for Ubuntu
    VS Code deb installer for Ubuntu
  5. Click the Install button.

    Visual Studio Code GUI install on Ubuntu
    Visual Studio Code GUI install on Ubuntu

Once you complete the steps, Visual Studio Code will install, and it’ll the be available from the “apps” menu.

How to install Visual Studio Code with Snap on Ubuntu

Snap is the store that officially supports the distribution of Visual Studio Code.

To install VS Code with Snap, use these steps:

  1. Open Terminal.

  2. Type the following command to install Visual Studio Code on Linux and press Enter:

    sudo snap install --classic code

    Install Visual Studio Code with Snap
    Install Visual Studio Code with Snap

After you complete the steps, you can start the editor from the “apps” menu. Also, when an new update is update is available, the Snap daemon will update the application automatically.

How to install Visual Studio Code using apt-get on Ubuntu

To install VS Code using terminal command, use these steps:

  1. Open Terminal.

  2. Type the following command and press Enter:

    sudo apt-get update
  3. Type the following command and press Enter:

    sudo apt install software-properties-common apt-transport-https wget
  4. Type the following command to import the Microsoft GPC key and press Enter:

    wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add –
  5. Type the following command to enable VS Code repository and press Enter:

    sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
  6. Type the following command to install Visual Studio Code and press Enter:

    sudo apt-get install code

    Install Visual Studio Code with apt-get
    Install Visual Studio Code with apt-get

Once you complete the steps, Visual Studio Code will install on your device. If a new update is available, you should be able to update through the Ubuntu software update manager, or you can use the sudo apt update followed by the sudo apt upgrade command.

About the author

Mauro Huculak is a Windows How-To Expert who started Pureinfotech in 2010 as an independent online publication. He has also been a Windows Central contributor for nearly a decade. Mauro has over 15 years of experience writing comprehensive guides and creating professional videos about Windows and software, including Android and Linux. Before becoming a technology writer, he was an IT administrator for seven years. In total, Mauro has over 21 years of combined experience in technology. Throughout his career, he achieved different professional certifications from Microsoft (MSCA), Cisco (CCNP), VMware (VCP), and CompTIA (A+ and Network+), and he has been recognized as a Microsoft MVP for many years. You can follow him on X (Twitter), YouTube, LinkedIn and About.me. Email him at [email protected].