Skip to content

Learn Qwik from A to Z (2025)

Install Visual Studio Code on Ubuntu (2/∞)

This guide will help you install Visual Studio Code easily and safely on Ubuntu using official sources.

Install Visual Studio Code on Ubuntu
Install Visual Studio Code on Ubuntu

🚀 Why install Visual Studio Code?

Visual Studio Code is one of the most popular code editors. It's fast, extensible and offers great support for JavaScript and Qwik development. Before starting any Qwik project, installing VS Code is highly recommended.

🎒 Prerequisites for Building a Qwik App

Before creating your first project, here's what you'll need:

📌 Open your Terminal

Open Terminal Ubuntu
Launch your Terminal from the sidebar or press Ctrl + Alt + T. If it's not pinned, refer to our previous article.

🔄 Update your package list

Always update your package list to make sure you have the latest package information.

Terminal
sudo apt update

🔐 Enter your password

Because you're using sudo, Ubuntu asks for your admin password. Type it and press Enter.

Sudo password prompt

🔑 Add Microsoft’s GPG key

Before installing Visual Studio Code, Ubuntu must be able to verify that the packages really come from Microsoft and are safe to install. This is why we need to add Microsoft's official GPG key. Without this, Ubuntu would block the installation for security reasons.

👉 This command comes directly from the official documentation of Visual Studio Code on Linux: https://code.visualstudio.com/docs/setup/linux

Terminal
Add Microsoft GPG Key
Adding Microsoft's GPG key to allow Ubuntu to trust VS Code packages

➕ Add the official Visual Studio Code repository

By default, Ubuntu does not know where to find Visual Studio Code. To make it available through the package manager (apt), we need to add Microsoft's official repository to Ubuntu's list of sources.

This repository contains the latest stable releases of Visual Studio Code, and ensures you will always get the official and up-to-date version when running apt install.

👉 This command comes from the official Visual Studio Code installation guide for Linux: https://code.visualstudio.com/docs/setup/linux

Terminal
Add VS Code repository
Adding Microsoft's official repository so Ubuntu can download Visual Studio Code

🔄 Update your package list again

After adding the repository, refresh your package list again.

Terminal
Update package list after adding repo

📥 Install Visual Studio Code

Now that the repository is added and your package list is up to date, you can install Visual Studio Code just like any other software using apt.

This command will download and install the latest stable version of Visual Studio Code directly from Microsoft's repository:

Terminal
Install Visual Studio Code
Installing Visual Studio Code using the apt command

🚀 Launch Visual Studio Code

Visual Studio Code is now installed on your system! You can launch it at any time by typing code in your Terminal.

Alternatively, you can also find it in the Ubuntu application menu, like any other app.

Terminal
Launch Visual Studio Code
Launching Visual Studio Code from the Terminal

🎥 Watch the Video

Not sure about all the steps or just want to see it in action? No problem! Watch this short video to see exactly how to install Visual Studio Code on Ubuntu, step by step.

🎉 Well done!

Visual Studio Code is now installed and ready to use on your Ubuntu system. You can start installing extensions and preparing your Qwik project!

VS Code opened

Have questions, issues, or feedback?

Join our official Learn Qwik Discord server to get help and connect with the community.

🚀 Next step

You are now ready to create your first Qwik app from scratch!

Next step 👉 Create your first Qwik app