How to Install Visual Studio Code on Ubuntu

Published February 8, 2024
How to Install Visual Studio Code on Ubuntu
Cheap Dedicated Server

How to Install Visual Studio Code on Ubuntu


Introduction:

Visual Studio Code (VS Code) is a popular and powerful code editor developed by Microsoft. It’s widely used by developers for various programming languages and platforms due to its versatility, customizable features, and extensive plugin ecosystem. If you’re an Ubuntu user looking to install Visual Studio Code, you’re in the right place. In this guide, we’ll walk you through the step-by-step process of installing VS Code on your Ubuntu system.

Step 1: Update Your System

Before installing any new software, it’s always a good practice to ensure that your system’s package list and installed packages are up-to-date. Open a terminal window by pressing `Ctrl + Alt + T` and run the following commands:

sudo apt update
sudo apt upgrade

apt update

Enter your password when prompted and allow the system to update.

Step 2: Download Visual Studio Code

Visual Studio Code provides a Debian package (`.deb`) for easy installation on Ubuntu. You can download the latest version from the official website or use `wget` directly from the terminal. Here’s how to download the `.deb` package using `wget`:

wget -O ~/vscode.deb https://go.microsoft.com/fwlink/?LinkID=760868

download visual studio code

This command will download the latest version of Visual Studio Code and save it as `vscode.deb` in your home directory (`~/`).

Step 3: Install Visual Studio Code

Once the download is complete, you can install Visual Studio Code using `dpkg`, the package manager for Debian-based systems. In the terminal, navigate to the directory where the `.deb` package is located (typically your home directory) and run the following command:

sudo dpkg -i ~/vscode.deb

Install Visual Studio Code1

This command will install Visual Studio Code on your system. If you encounter any dependency errors, you can resolve them by running:

sudo apt install -f

Install Visual Studio Code

Step 4: Launch Visual Studio Code

Once the installation is complete, you can launch Visual Studio Code from the application menu or by typing `code` in the terminal. Alternatively, you can use the following command:

code

Launch Visual Studio Code

Congratulations! You have successfully installed Visual Studio Code on your Ubuntu system. You can now start coding and customize the editor according to your preferences.

Conclusion:

In this tutorial, we covered the step-by-step process of installing Visual Studio Code on Ubuntu. By following these instructions, you can set up a powerful and versatile code editor on your Ubuntu system and enhance your development workflow. Happy coding!


 

Install Visual Studio Code on Ubuntu Server ​(F.A.Q)

 

Is Visual Studio Code available in the Ubuntu Software Center?

No, Visual Studio Code is not available in the default Ubuntu Software Center. However, you can download and install it manually using the .deb package provided by Microsoft.

Can I update Visual Studio Code automatically after installing it?

Yes, once you have installed Visual Studio Code using the .deb package, it will be added to your system’s package list. You will receive updates for Visual Studio Code through the regular system updates managed by apt.

Do I need to uninstall any existing version of Visual Studio Code before installing a new one?

It’s not necessary to uninstall the existing version of Visual Studio Code before installing a new one using the .deb package. The new installation will overwrite the existing one and retain your settings and extensions.

 

Is Visual Studio Code open source?

While Visual Studio Code itself is not fully open source, the source code for the editor is available on GitHub under the MIT License. However, certain parts of the software, such as the Visual Studio Code Marketplace and certain extension components, are not open source.