Visual Studio Code, install this open source editor on Ubuntu 20.04

about Visual Studio Code on Ubuntu 20.04

In the following article we are going to take a look at two ways to install Visual Studio Code on Ubuntu 20.04. For users who still do not know this program, we must tell them that Visual Studio Code is a free and open source code editor developed by Microsoft and that it is distributed under the MIT license.

Visual Studio Code is cross-platform, so we can find it available for Gnu / Linu, Windows and macOS. It is based on Electron and NodeJS for the desktop and runs on the Blink design engine.

This editor is also customizable, so users can set our configuration changing editor theme, keyboard shortcuts and preferences. It has built-in debugging support, built-in Git control, syntax highlighting, code completion, built-in terminal, code refactoring, and snippets.

Additionally, the editor comes with built-in support for JavaScript, TypeScript, and Node.js and has a rich ecosystem of extensions for other languages ​​(like C ++, C #, Java, Python, PHP, Go, etc.) and execution times (like .NET and Unity).

Install Visual Studio Code on Ubuntu 20.04

Visual Studio Code example

In Ubunutu 20.04 we will be able to install VS Code as a snap package via the store Snapcraft or as a deb package from the Microsoft repositories. Here each user can choose the installation method that is most appropriate for their environment.

As a snap package

The Visual Studio Code package is distributed and maintained by Microsoft. Snaps are self-contained software packages that include the binary for all the dependencies required to run the application. Snap packages are easy to update and secure. These packages in Ubuntu can be installed from the command line or through the Ubuntu software application.

To install VS Code we will only have to open a terminal (Ctrl + Alt + T) and run the following command:

VS Code snap installation

sudo snap install --classic code

After executing the previous command, Visual Studio Code should be installed on our Ubuntu 20.04 machine and we can start using it.

If you prefer to use a GUI for installation, there is nothing more than open Ubuntu software option and search 'Visual Studio Code'and install the application:

Visual Studio Code, install from software option

Every time a new version is released, the VS Code package will automatically update in the background.

As a .deb package using apt

Visual Studio Code is also available in the official Microsoft repositories. To install it we will only have to follow the following steps.

To start we will update package index and install necessary dependencies running the following command in a terminal (Ctrl + Alt + T):

install Virtual Studio Code dependencies

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

The next thing we will do is import the Microsoft GPG key using wget as follows:

microsoft gpg key

wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -

At this point we can enable VS Code repository typing in the same terminal:

add vs code

sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"

Once the apt repository is enabled, we can start package installation typing:

VS Code installation with apt

sudo apt install code

When a new version is released, we will be able to update the VS Code package through the standard software update tool on our desktop. We will also be able to update it by executing the following commands in the terminal (Ctrl + Alt + T):

sudo apt update; sudo apt upgrade

Starting Visual Studio Code

After the installation, we can launch the program by typing in the Activities search bar 'Visual Studio Code'. We will only have to click on the icon to start the application.

Visual Studio Code launcher

When we start VS Code for the first time, a window like the following should appear:

startup screen in VS Code

Now we can start installing extensions and configure the VS Code according to our preferences.

VS Code can also be started from the command line typing:

code

At this point, we can start installing new extensions and customizing the workspace. For more information about VS Code, users can visit the page of official documentation, project websiteo the  F.A.Q. of the project.


7 comments, leave yours

Leave a Comment

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

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   guizans said

    Hey.

    In the title of the entry it says "Virtual" instead of "Visual" xD, xD.

    A greeting.

    1.    Damien Amoedo said

      Thanks for the notice xD.

  2.   Rafa said

    The fact that it is from Microsoft has always thrown me back, it is clear that I have prejudices in this regard. And I learned how to use Sublime Text 3 to do the little things that I do in python and mel.
    Anyway thanks for the article.

  3.   José said

    This is horrible, they want new developers to get used to their products so that free software tools die and end up developing in windows with visual studio. Is that you do not realize it !!!! ???

    I recommend you try kdevelop or codelite or codeblocks or eclipse cdt. The first three are integrated with the distribution and are much better !!!

    1.    Sergio said

      It seems to me a good tool to develop code, but you can also use others, for example codeblocks for co c ++, each language has a select code editor, but vscode integrates all of those to allow the programmer to stream within the same program and thus make it more efficient 🙂.

  4.   Bruno said

    Hi I am something new in this, you say that the snap package will update automatically, the .deb is not updated? Should it be installed again or is it possible to update it?

    1.    Damien A. said

      Hello. Whether you use the snap package or you use the repository shown in the article, the program should be updated when you receive updates on the system, and program updates are received. No need to reinstall it again. Salu2.