Linux Mint

How to Install and Use Visual Studio Code on Linux Mint 20

Developed by Microsoft, Visual Studio (VS) Code is a multi-platform, modern, and comprehensive code editor. The Visual Studio Code supports TypeScript, Node.JS, JavaScript by default. Moreover, a plethora of extensions are available for visual studio code, enabling us to support other programming languages like C, C++, GO, etc. The Visual Studio Code is available as a Debian package, flatpak package, and snap application.

Installing Visual Studio Code on Linux Mint 20 from the Debian package

To download the VS Code official Debian package, open your browser and visit the VS Code webpage (https://code.visualstudio.com/Download).

The VS code Debian package, is available for Linux. Click on the Debian package to download it.

Next, choose ‘Save File’ and click on ‘OK’.

The VS, code Debian package, will be downloaded in the ‘Downloads’ directory.

Once the Debian package is downloaded, fire up the terminal and navigate to the ‘Downloads’ directory with the command:

$ cd Downloads

Next, update the apt cache because it is recommended to update the apt cache before installing any new application:

$ sudo apt update

Type the below-given command to install the VS code .deb package:

$ sudo apt install ./code_1.52.1-1608136922_amd64.deb

When the VS code is successfully installed, verify the installation and check the installed version using the command:

$ code --version

The VS code 1.52.1 is successfully installed on my Linux Mint 20.

Installing Visual Studio Code on Linux Mint 20 from the snap application manager

Snap is the universal package manager for various Linux distribution. However, it is disabled on Linux Mint 20 by default. To install VS Code from the snap application manager, we need to enable and install the snapd on Linux Mint 20.

Before installing snap on Linux Mint 20, remove the nosnap.pref file with the command:

$ sudo rm /etc/apt/preferences.d/nosnap.pref

Next, update the apt cache and install the snapd with the commands:

$ sudo apt update

$ sudo apt install snapd

To install VS Code from the snap application manager, execute the command:

$ sudo snap install code --classic

Verify the installation using the command:

$ snap info code

Installing Visual Studio Code flatpak package on Linux Mint 20

Flatpak is also a package manager for Linux. It comes pre-installed on Linux Mint 20.

Fire up the terminal and update the apt cache before installing the Visual Studio Code flatpak package:

$ sudo apt update

Now, install the Visual Studio Code flatpak package with the command:

$ sudo flatpak install flathub com.visualstudio.code

The Visual Studio Code flatpak package is successfully installed.


Press ‘y’ to continue installing the Visual Studio Code flatpak package.

Getting started with Visual Studio Code

Once you have installed the Visual Studio Code application using any of the described methods, click on the Application Menu and search for Visual Studio Code.

Open the Visual Studio Code application, and a dashboard screen will appear. The default theme of Visual Studio Code is dark, but it can be changed as well.

To change the theme, click on File, choose preferences and select ‘Color Theme’.

Select the theme for the given list of themes.

The theme will be updated successfully.

To create a new file, press ctrl+n and start using Visual Studio Code.

Conclusion

Visual Studio Code is a free and popular code editor. It is a multi-platform tool installed on Linux Mint 20 through the Debian package, flatpak, and snap application manager. It provides a wide variety of extensions that enable us to use famous programming languages. This post explains the Visual Studio Code installation on Linux Mint 20.

About the author

Kamran Sattar Awaisi

I am a software engineer and a research scholar. I like to write article and make tutorial on various IT topics including Python, Cloud Computing, Fog Computing and Deep Learning. I love to use Linux based operating systems.