How To Install VS Code Editor On Ubuntu 22.04 LTS [Multiple Methods]

How To Install VS Code Editor On Ubuntu 22.04 LTS [Multiple Methods]

Install Microsoft VS Code on Ubuntu using multiple methods.

In this tutorial post, we are going to install VS code editor on Ubuntu using various methods. These steps for the installation of the Microsoft Visual Code Editor are applicable for the Ubuntu 22.04 LTS and Ubuntu 20.04 LTS.

VS Code Editor Or Visual Studio Code Editor is an open-source code editor from Microsoft.

How To Install VS Code Editor On Ubuntu 22.04 LTS [Multiple Methods]

Method To Install VS Code Editor On Ubuntu Via Command:

First, run the following command to update your system:

sudo apt update

After updating the system, download the .deb package file of VS code editor.

wget -O vscode.deb 'https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64'

Now, you can install VS Code editor on Ubuntu with the following command:

sudo apt install ./vscode.deb

Just in case you want to remove the VS Code editor from Ubuntu 22.04 LTS, execute the following command:

sudo apt remove code -y

Method To Install VS Code Editor On Ubuntu Via Ubuntu Software

Search VS Code editor from the Ubuntu software center and install it without any hassle.

Method To Install VS Code Editor On Ubuntu Via Repository

Run the following command to add Repositor of VS Code Editor on your Ubuntu.

sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/trusted.gpg.d/packages.microsoft.gpg] \
https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'

After adding the repo, run the following command to add the GPG key used to sign the packages of VScode by Microsoft.

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 /etc/apt/trusted.gpg.d/
rm -f packages.microsoft.gpg

Now update your Ubuntu system:

sudo apt update

Execute the APT command to install Visual Studio Code on Ubuntu.

sudo apt install code

and to remove it from your Ubuntu, open your terminal and run the following command.

sudo apt remove code -y

Method To Install VS Code Editor On Ubuntu Via Snapd

READ More Relevant Stuff:  Ubuntu 23.04 Official Flavors Released

It is pretty easy and simple to install Microsoft VS Code Editor on Ubuntu via Snapd. You just need to fire one single command and you are good to go with VS code editor.

sudo snap install --classic code

If you want to remove, use the following snap command:

sudo snap remove code

Comments

No comments yet. Why don’t you start the discussion?

    Leave a Reply

    Your email address will not be published. Required fields are marked *