How to Install Visual Studio Code on Ubuntu ?

Discover the seamless installation process of Visual Studio Code on Ubuntu with our step-by-step guide. Get started with this versatile code editor effortlessly. Uninstalling tips included!

Updated: 26 Jan, 24 by Lisa P 4 Min

List of content you will read in this article:

If you're a Ubuntu Linux user and looking for a versatile code editor, you're in the right place. Visual Studio Code, often referred to as VS Code, is a powerful and highly customizable code editor developed by Microsoft. In this guide, we'll walk you through the step-by-step process of installing VS Code on your Ubuntu system, ensuring that you're up and running in no time.

👉 Explore our comprehensive list of the "Best code editors for all programmers" to find the perfect one for your coding needs!

Visual Studio Code, commonly known as VS Code, is a free and open-source code editor that has gained immense popularity within the developer community. It's packed with features designed to enhance productivity and streamline the coding process. Some of its key features include:

  • Intelligent Code Editing: VS Code offers smart, context-aware code completion and suggestions, making coding faster and more efficient.
  • Versatile Language Support: It supports a wide range of programming languages, thanks to its extensive collection of extensions.
  • Integrated Version Control: You can easily manage your Git repositories and perform version control tasks right from the editor.
  • Customizable Interface: VS Code's user interface is highly customizable, allowing you to tailor it to your preferences with themes, extensions, and settings.

Now that you know why VS Code is a top choice among developers, let's get started with the installation process.

Snap packages are a convenient way to install software on Ubuntu, and Visual Studio Code is no exception. Here's how you can install it using the terminal:

  1. Open the Terminal: Launch the terminal by pressing `Ctrl` + `Alt` + `T` or searching for "Terminal" in the applications menu.
  2. Update APT: Run the following command to make sure your package list is up to date:

   sudo apt update

  1. Install the Snap Package: Use the following command to install VS Code:

   sudo snap install --classic code

  1. Launch VS Code: Once the installation is complete, you can start Visual Studio Code by typing:

   code

🔗 "Explore more essential Linux commands in our comprehensive guide on 'Mastering Linux Commands' to enhance your command-line skills. 💡🐧"

If you prefer using APT for package management, you can install VS Code with these steps:

  1. Open the Terminal: Just like before, open the terminal on your Ubuntu system.
  2. Add the Microsoft Repository: Run the following command to add the Microsoft repository:

   sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"

  1. Update APT: Update your package list once again:

   sudo apt update

  1. Install VS Code: Now, use the following command to install Visual Studio Code:

   sudo apt install code

  1. Launch VS Code: Start VS Code by simply typing:

   code

If you prefer a graphical user interface (GUI), you can install VS Code using the Ubuntu Software Center or your preferred package manager. Here's how:

  1. Open the Ubuntu Software Center: Search for "Ubuntu Software" in your applications menu and open it.
  2. Search for VS Code: In the software center, search for "Visual Studio Code."
  3. Install VS Code: Click on the Visual Studio Code entry and then click the "Install" button.
  4. Launch VS Code: Once the installation is complete, you can launch VS Code from your applications menu.

Should you ever decide to remove Visual Studio Code from your Ubuntu system, you can do so easily:

  1. Open the Terminal: Launch the terminal once again.
  2. Run the Uninstall Command: Enter the following command to uninstall VS Code:  

   sudo apt remove --purge code

  1. Remove Residual Configuration: To remove any residual configuration files, use:

   sudo apt autoremove

In conclusion, Visual Studio Code is an excellent choice for Ubuntu users who require a feature-rich and user-friendly code editor. Whether you choose to install it via Snap, APT, or the GUI, you'll be equipped with a powerful tool to enhance your coding experience on Ubuntu. Happy coding.

Visual Studio Code is compatible with various versions of Ubuntu, including the latest Long-Term Support (LTS) releases and non-LTS versions. It's designed to work smoothly across different Ubuntu iterations.

Absolutely! Visual Studio Code supports multiple extensions simultaneously. You can easily install and manage extensions for various programming languages and development tools, enhancing your coding experience.

VS Code has relatively modest system requirements. To run it smoothly on Ubuntu, ensure your system has at least 1GB of RAM and a 1.6 GHz or faster processor. These requirements should be met by most modern Ubuntu installations.

To update VS Code on Ubuntu, you can either use the built-in package manager for your installation method (Snap or APT), or you can download and install the latest .deb package from the official VS Code website.

Yes, you can! Visual Studio Code is a versatile code editor that can be used for various purposes, including editing Markdown, HTML, and other markup languages. It offers extensions and plugins to enhance support for non-programming languages as well.

Lisa P

Lisa P

Hello, everyone, my name is Lisa. I'm a passionate electrical engineering student with a keen interest in technology. I'm fascinated by the intersection of engineering principles and technological advancements, and I'm eager to contribute to the field by applying my knowledge and skills to solve real-world problems.