- Install Visual Studio Code on Linux Mint 21
- Install Visual Studio Code on Linux Mint 21
- Step 1: Add Visual Studio Code repository and key
- Step 2: Add APT repository to Linux Mint
- Step 3: Visual Studio Code on Linux Mint 21
- Step 3: Launch Visual Studio Code on Linux Mint 21
- How to Install Visual Studio Code on Linux Mint
- Step 1: Download and install Visual Studio Code
- Step 2: Install Visual Studio Code from repository
- Step 3: Install Visual Studio Code via Repository
- Step 4: Uninstall Visual Studio Code
- How to Install and Use Visual Studio Code on Linux Mint 20
- Installing Visual Studio Code on Linux Mint 20 from the Debian package
- Installing Visual Studio Code on Linux Mint 20 from the snap application manager
- Installing Visual Studio Code flatpak package on Linux Mint 20
- Getting started with Visual Studio Code
- Conclusion
- About the author
- Kamran Sattar Awaisi
Install Visual Studio Code on Linux Mint 21
Visual Studio Code is the 21st century code editor that provides comprehensive code editing, navigation, and understanding support along with lightweight debugging, a rich extensibility model, and lightweight integration with existing tools. VSCode is free and built on open source for Windows, Linux and macOS. In this tutorial I’ll show you how you can install Visual Studio Code (VSCode) on Linux Mint 21.
VS Code comes with built-in support for JavaScript, TypeScript and Node.js and has a rich ecosystem of extensions for other languages (such as C++, C#, Java, Python, PHP, Go) and runtimes (such as .NET and Unity). You can easily install extensions to add new languages, themes, debuggers, and to connect to additional services
Install Visual Studio Code on Linux Mint 21
A debian installation package is provided for use on Debian based systems – Debian, Ubuntu, Linux mint, Kali Linux e.t.c. You can check the latest packages from the VS Code Downloads page. If you want to use wget command line to pull the .deb package directly, install it like below.
Install wget if not present.
sudo apt update sudo apt -y install wget
We will instead use the Microsoft APT repository to install Visual Studio Code on Linux Mint 21.
Step 1: Add Visual Studio Code repository and key
The APT repository key is required for validation of signed packages to be installed. Add the key to the system using the commands below.
sudo apt update sudo apt install apt-transport-https curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/
Step 2: Add APT repository to Linux Mint
With the APT repository key imported to the system proceed to add the repository contents.
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
The contents are written to the file /etc/apt/sources.list.d/vscode.list.
$ cat /etc/apt/sources.list.d/vscode.list deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main
Step 3: Visual Studio Code on Linux Mint 21
Run the apt update command to update packages list.
Then install Visual Studio Code on Linux Mint 21.
The installation process is ussually quick, only few seconds or minutes for poor internet connection.
Reading package lists. Done Building dependency tree. Done Reading state information. Done The following NEW packages will be installed: code 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 85.8 MB of archives. After this operation, 369 MB of additional disk space will be used. Get:1 https://packages.microsoft.com/repos/vscode stable/main amd64 code amd64 1.69.2-1658162013 [85.8 MB] Fetched 85.8 MB in 2s (43.4 MB/s) Selecting previously unselected package code. (Reading database . 320370 files and directories currently installed.) Preparing to unpack . /code_1.69.2-1658162013_amd64.deb . Unpacking code (1.69.2-1658162013) . Setting up code (1.69.2-1658162013) . Processing triggers for gnome-menus (3.36.0-1ubuntu3) . Processing triggers for shared-mime-info (2.1-2) . Processing triggers for mailcap (3.70+nmu1ubuntu1) . Processing triggers for desktop-file-utils (0.26+mint1+vanessa) .
Step 3: Launch Visual Studio Code on Linux Mint 21
You can launch Visual Studio Code on Linux Mint 21 from the command line or Desktop Launcher.
How to Install Visual Studio Code on Linux Mint
In this short tutorial shows how to install Microsoft Visual Studio Code on Linux Mint.
Visual Studio Code is one of top IDEs for Python. Information about top Python code editors is available here: Complete list of 10 best Python IDEs and Code editors of 2020
Visual Studio Code is an open source IDE developed by Microsoft which is available for Linux. It offers many interesting features like:
- Syntax highlight
- Code completion
- Version control
- IntelliSense
- marketplace
- Developer Community
Step 1: Download and install Visual Studio Code
The easiest, best and recommended way is to install Visual Studio Code by getting the latest .deb file and install it to your Linux Mint.
Visual Studio Code is available for download here:
- Download or save the code_1.51.1-1605051630_amd64.deb file
- Open the downloaded .deb with GDebi Package Installer
- by default is downloaded in ~/Downloads
Once the installation is complete the program can be started from:
What about updates? Installing the VS Code as .deb package will automatically install the apt repository and signing key to enable auto-updating using the system’s package manager.
Step 2: Install Visual Studio Code from repository
If you prefer to add the repository and the signing key manually then you can run next commands:
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg sudo install -o root -g root -m 644 packages.microsoft.gpg /etc/apt/trusted.gpg.d/ sudo sh -c 'echo "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/packages.microsoft.gpg] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
After update of the packages:
sudo apt-get install apt-transport-https sudo apt-get update
the VS Code can be installed by:
sudo apt-get install code # or code-insiders
Step 3: Install Visual Studio Code via Repository
Visual Studio Code is also available in the Software Manager of Linux Mint. The package is available as a Flatpak.
In order to install VS Code from Software Manager follow:
- Software Manager
- Search for Visual Studio
- Open Visual Studio Code
- Install Package
- Enter your password
Note: When I tried this package in the past there were problems with the terminal which was not able to recognize basic commands. Unit tests and browsers were not working as well.
All the basic code features were OK. If you go with this edition be careful if you face errors I would recommend for you to for the official .dev file — explained in the other steps.
Step 4: Uninstall Visual Studio Code
How to uninstall Visual Studio Code installed as a .deb file:
- Menu
- Programming
- Find Visual Studio Code
- right click
- Uninstall
- Uninstall the package
By using SoftHints — Python, Linux, Pandas , you agree to our Cookie Policy.
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:
Next, update the apt cache because it is recommended to update the apt cache before installing any new application:
Type the below-given command to install the VS code .deb package:
When the VS code is successfully installed, verify the installation and check the installed version using the command:
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:
Next, update the apt cache and install the snapd with the commands:
To install VS Code from the snap application manager, execute the command:
Verify the installation using the command:
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:
Now, install the Visual Studio Code flatpak package with the command:
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.