Install VsCode on Linux

1. In Ubuntu

There are two ways that you can install vscode in your ubuntu machine.

  1. With snap package
  2. With apt

Install with snap package with bellow command in terminal:

sudo snap install –classic code

That’s it. Visual Studio Code has been installed on your Ubuntu machine.

Install with apt installer.

First, update the packages typing in terminal:

sudo apt update

Second, Install those dependency:

sudo apt install software-properties-common apt-transport-https wget

Third, Import the Microsoft GPG key using the following command:

wget -q -O- | sudo apt-key add –

Fourth, Enable the Visual Studio Code repository by typing:

sudo add-apt-repository “deb [arch=amd64] stable main”

Finally, Install the vscode:

sudo apt install code

2. In RHEL, Fedora, and CentOS based distributions

We currently ship the stable 64-bit VS Code in a yum repository, the following script will install the key and repository:

sudo rpm --import
sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=\nenabled=1\ngpgcheck=1\ngpgkey=" > /etc/yum.repos.d/vscode.repo'

Then update the package cache and install the package using dnf (Fedora 22 and above):

sudo dnf check-update
sudo dnf install code

Installation completed happy coding with vscode.

Leave a Reply

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