How to Install Visual Studio Code on Linux

Visual Studio Code (VS Code) is a powerful, lightweight code editor built by Microsoft. It's widely appreciated for its performance, customization, and rich extension ecosystem. If you're using Linux, getting VS Code up and running is simple — let’s walk through the steps!

1. Update your system package index

Before installing anything, it's a good idea to make sure your system's package index is up to date.

sudo apt update

2. Install required dependencies

You may need curl and gpg for key management and downloads. Run this command to ensure they’re installed:

sudo apt install software-properties-common apt-transport-https curl gpg

3. Import the Microsoft GPG key

This step ensures your system can verify the packages coming from Microsoft’s servers.

curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --dearmor -o /usr/share/keyrings/microsoft.gpg

4. Enable the VS Code repository

Add the official Microsoft repository to your list of sources.

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

5. Update packages again to include VS Code

This ensures your system now sees the new repository and available packages.

sudo apt update

6. Install Visual Studio Code

You're now ready to install the editor!

sudo apt install code

7. Launch Visual Studio Code

You can now start using VS Code by running:

code

Or find it in your applications menu.


That’s it — you’ve successfully installed Visual Studio Code on your Linux machine. With thousands of extensions available and support for every major language, VS Code is now your gateway to a streamlined coding experience. Happy coding!

Comments

Popular posts from this blog

How to Set Up a New NotebookLM in NotebookLM

How to Automatically Identify Speakers in Audio Using NotebookLM

How to Generate a Slide Deck with Diagrams, Charts, and Formulas with Gemini 2.5 Flash