Install VS Code on Linux

shape
shape
shape
shape
shape
shape
shape
shape
Install VS Code on Linux

Install VS Code on Linux: Complete Developer Guide

What is Visual Studio Code and why should you install it on Linux?

Visual Studio Code (VS Code) is a lightweight yet powerful source code editor developed by Microsoft. It supports multiple programming languages, debugging tools, and a rich extension ecosystem.

If you’re working on Linux, VS Code offers excellent performance, deep customization, and seamless integration with development workflows.

  • Free and open-source core
  • Supports Python, JavaScript, C++, and more
  • Integrated terminal and Git support
  • Extensive extension marketplace

How to install VS Code on Linux?

To install VS Code on Linux, you can use package managers, Snap, Flatpak, or manual downloads depending on your distribution.

This guide covers all major methods for Ubuntu, Debian, Fedora, Arch, and other Linux systems.

How to install VS Code on Ubuntu and Debian?

The easiest and most recommended way is using Microsoft’s official repository.

Step-by-step installation using APT

  1. Update system packages:
sudo apt update
  1. Install required dependencies:
sudo apt install software-properties-common apt-transport-https wget
  1. Import Microsoft GPG key:
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg sudo install -o root -g root -m 644 packages.microsoft.gpg /usr/share/keyrings/
  1. Add VS Code repository:
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" | sudo tee /etc/apt/sources.list.d/vscode.list
  1. Install VS Code:
sudo apt update sudo apt install code

Once installed, launch it using:

code

How to install VS Code on Fedora, RHEL, and CentOS?

For RPM-based distributions, use the DNF or YUM package manager.

Installation steps

  1. Import Microsoft GPG key:
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
  1. Add VS Code repository:
sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'
  1. Install VS Code:
sudo dnf install code

How to install VS Code on Arch Linux?

On Arch-based systems, VS Code is available via the AUR (Arch User Repository).

Using yay (AUR helper)

yay -S visual-studio-code-bin

This installs the official binary version maintained in the AUR.

Can you install VS Code using Snap?

Yes, Snap provides a universal installation method across Linux distributions.

Install via Snap

sudo snap install code --classic

This method is simple and works on most systems with Snap support.

How to install VS Code using Flatpak?

Flatpak is another cross-distribution package manager.

Installation steps

flatpak install flathub com.visualstudio.code

Run VS Code:

flatpak run com.visualstudio.code

How to install VS Code manually using .deb or .rpm packages?

You can download installation files directly from Microsoft and install them manually.

For Debian/Ubuntu (.deb)

sudo dpkg -i code_*.deb sudo apt-get install -f

For Fedora/RHEL (.rpm)

sudo rpm -i code_*.rpm

How to verify VS Code installation?

After installation, confirm that VS Code is installed correctly.

Check version

code --version

You should see the installed version displayed in the terminal.

How to launch VS Code on Linux?

You can launch VS Code in multiple ways:

  • From terminal: code
  • From application menu
  • Open folder directly:
code .

What are essential extensions after installing VS Code?

Installing extensions enhances productivity and adds features.

Recommended extensions

  • Python
  • Prettier – Code formatter
  • ESLint
  • GitLens
  • Docker
  • Remote - SSH

How to update VS Code on Linux?

VS Code updates automatically if installed via official repositories.

Manual update commands

  • APT systems:
sudo apt update && sudo apt upgrade
  • DNF systems:
sudo dnf update
  • Snap:
sudo snap refresh

What are common installation issues and fixes?

Why does VS Code not open after installation?

This usually happens due to missing dependencies or corrupted installation.

  • Reinstall the package
  • Check logs using terminal
  • Update system libraries

Why is “code” command not found?

The binary might not be added to PATH.

  • Restart terminal
  • Reinstall VS Code
  • Check installation path

How to fix permission issues?

  • Use sudo for installation
  • Ensure proper user permissions

How to uninstall VS Code on Linux?

If needed, you can remove VS Code easily.

APT removal

sudo apt remove code

DNF removal

sudo dnf remove code

Snap removal

sudo snap remove code

How to optimize VS Code performance on Linux?

VS Code is lightweight, but optimization improves responsiveness.

Performance tips

  • Disable unused extensions
  • Increase file watcher limits
  • Use workspace-specific settings
  • Enable hardware acceleration

Why is VS Code a good choice for developers on Linux?

VS Code combines simplicity with powerful developer tools.

  • Cross-platform compatibility
  • Fast startup time
  • Rich plugin ecosystem
  • Integrated debugging tools

How does VS Code compare with other Linux editors?

VS Code vs Vim

  • VS Code: GUI-based, beginner-friendly
  • Vim: Terminal-based, steep learning curve

VS Code vs Sublime Text

  • VS Code: Free, open ecosystem
  • Sublime: Paid license, faster performance

How can developers customize VS Code on Linux?

Customization is one of VS Code’s strongest features.

Customization options

  • Themes and icons
  • Keyboard shortcuts
  • User and workspace settings
  • Custom snippets

FAQ: Install VS Code on Linux

Is VS Code free to use on Linux?

Yes, VS Code is free to download and use. Its core is open-source, with additional Microsoft features included in the official build.

Which Linux distributions support VS Code?

VS Code supports Ubuntu, Debian, Fedora, RHEL, Arch Linux, and most major distributions.

Can I install VS Code without root access?

Yes, you can use portable versions or install it in a local directory, but most methods require sudo privileges.

Is Snap or APT better for installing VS Code?

APT is preferred for better system integration, while Snap is easier and more universal.

How do I open a project folder in VS Code?

Use the command:

code folder-name

Does VS Code support remote development?

Yes, using extensions like Remote SSH, you can develop on remote servers directly.

Can I use VS Code for web development?

Absolutely. It supports HTML, CSS, JavaScript, frameworks, and debugging tools.

How often is VS Code updated?

VS Code releases updates monthly, including new features and security improvements.

Conclusion

Learning how to install VS Code on Linux is an essential step for any developer aiming to build a productive and flexible development environment. With multiple installation methods available, you can choose the one that best fits your Linux distribution and workflow.

Once installed, VS Code becomes a powerful hub for coding, debugging, version control, and deployment. By leveraging extensions and customization, developers can tailor the editor to match their exact needs.

For those looking to enhance their development workflows alongside professional web solutions, WEBPEAK is a full-service digital marketing company providing Web Development, Digital Marketing, and SEO services.

Popular Posts

No posts found

Follow Us

WebPeak Blog

How to Clear Terminal in VS Code
March 22, 2026

How to Clear Terminal in VS Code

By Web Development

Discover how to clear terminal in VS Code with simple methods, shortcuts, and tips. Keep your coding environment clean and boost productivity easily.

Read More
Can AI Detect Human Actions
March 22, 2026

Can AI Detect Human Actions

By Web Development

Learn how AI detects human actions through video analysis, pose estimation, and machine learning. Includes use cases, accuracy, and challenges.

Read More
Install VS Code on Linux
March 22, 2026

Install VS Code on Linux

By Web Development

Learn how to install VS Code on Linux with step-by-step methods for Ubuntu, Debian, Fedora, and Arch. Complete developer guide with commands and tips.

Read More