How to Install Visual Studio Code in Ubuntu 18.04
VSCode is cross platform text editor and can be installed on Windows, Mac and Linux. This tutorial explains how to install Vscode on Ubuntu 18.04 Desktop operating system.
Visual Studio Code is now available in the Ubuntu snap package manager and this is also the quickest and easiest way to Install Visual Studio Code in Ubuntu 18.04.
To install VS Code, open the Ubuntu terminal and run:
sudo snap install vscode --classic
And that is all you have to do, if you want to uninstall vscode, simply run:
sudo snap remove vscode
To update visual studio code to latest stable version, run:
sudo snap refresh vscode
Alternatively, you can install the snap version of Vscode from the Ubuntu software center, if you don't want to use command line interface.
Downloading and installing the deb package
If you don't want to use snap package, then there is another way to install latest version of visual studio code on Ubuntu, by downloading the deb package.
- Download Visual Studio Code for Ubuntu 18.04 - Open the web browser and navigate to https://code.visualstudio.com/ and download the .deb installer to your hard disk.
- Install the deb package - After the download is complete, right click on the Vscode deb package and click: "Open With Software Install".
Command Line tool
Vscode includes a command line tool called 'code' to interact with the IDE. For example, to open VS Code from the command line, simply run:
To open a file, run:
To open a Folder, run:
List the installed extensions:
Installs or updates the extension.
code --install-extension extension-id
Uninstalls an extension:
code --uninstall-extension extension-id
For command line help, type: