1

I am using Ubuntu 18.04, and I need to install Visual Studio Code in my machine i tried:

sudo snap install --classic vscode

but it didn't work.

  • Could you add more detail about why it didn't work? – Pablo Bianchi Sep 20 '19 at 17:09
  • I think you were following one of the answer which was written in 2017. However in 2019, Microsoft released an official snap package due to which the older one was abandoned. This was already included in one of the comment. I have updated the package name in the answer. – Kulfy Sep 24 '19 at 14:37
4

To install Visual Studio Code Ubuntu 18.04, ust press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt update
sudo apt install software-properties-common apt-transport-https wget
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
sudo apt install code

Source.

0

After 18.04 version, the following one-line terminal code works well.

sudo snap install code --classic
0

In addition to Mitch's answer:

If you are not best friends with your shell (yet), you can also just visit Visual Studio Code home page and click on their download link.

When downloaded, you can double-click the .deb file which will open the Ubuntu Software Center and let you install vscode using a graphical interface.

Not the answer you're looking for? Browse other questions tagged or ask your own question.