Ubuntu Linux

How to Install Visual Studio Code in Ubuntu 18.04

Visual Studio Code, also known as VS Code is a lightweight IDE developed by Microsoft. Mainly designed for web application development and have built in support popular JavaScript frameworks, also has support for many different programming languages  such as PHP, Java, GO, C++, C#, Python and many more.

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.

How to Install Visual Studio Code in Ubuntu 18.04

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.

  1. 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.
    Download Visual Studio Code for Ubuntu 18.04
  2. Install the deb package – After the download is complete, right click on the Vscode deb package and click: “Open With Software Install”.
    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:

code

To open a file, run:

code file_name

To open a Folder, run:

code /path/to/folder/

Print version:

code -v

List the installed extensions:

code --list-extensions

Installs or updates the extension.

code --install-extension extension-id

Uninstalls an extension:

code --uninstall-extension extension-id

For command line help, type:

code -h

Vscode is a great text editor for your Ubuntu desktop. It is a lightweight code editor for web application and software development and comes with a huge set of extensions to improve your coding experience for many different languages and technologies, including  JavaScript, TypeScript, Angular, Python, HTML, CSS, Docker, Azure, Go, C#, C++ and many more.