How to Install Visual Studio Code on Linux Mint 21 or 20


Visual Studio Code (VSCode) is a powerful and popular code editor developed by Microsoft. It is designed to be a lightweight yet versatile tool that can be used for various programming languages and tasks. One of the benefits of using VSCode is that it can be easily incorporated into Linux Mint.

Features and Benefits of Visual Studio Code:

  • Intuitive interface with customizable layout and color schemes
  • Integrated debugging and task running
  • Built-in Git support
  • Large collection of extensions to add extra functionality
  • Fast and responsive performance
  • Regular updates with new features and improvements
  • Open-source, making it free to use and contribute to.
  • Support for a wide variety of programming languages, including C++, Python, JavaScript, and more
  • Built-in code completion and IntelliSense, which can help speed up development and reduce errors
  • Ability to work with multiple platforms and environments, such as Linux, Windows, and Mac
  • Built-in terminal for running commands and scripts directly within the editor
  • Collaboration tools, such as live sharing and remote development, to work with others on the same codebase
  • Regularly updated by a dedicated team of developers, ensuring that new features and improvements are constantly added to the software.

Visual Studio Code is a highly beneficial code editor for developers using Linux Mint. Its intuitive interface, built-in debugging and task running, and support for various languages make it an ideal choice for improving workflow and productivity. This guide will teach you how to install Visual Studio Code on Linux Mint 21 or 20 via the command line terminal. This includes importing the Microsoft official repository and gpg key and instructions for maintaining and removing the software in the future.

Step 1: Update Linux Mint

Before beginning the installation process, it is recommended to update your system to ensure all existing packages are up to date to prevent any conflicts from occurring.

sudo apt update && sudo apt upgrade

Step 2: Install the Required Packages

To ensure a smooth installation process, it is necessary to have the following packages installed. These are commonly found in most Linux distributions.

sudo apt install dirmngr ca-certificates software-properties-common apt-transport-https -y

Step 3: Import Visual Studio Code Repository

To proceed with the installation, you will need to import the Visual Studio Code repository. However, before doing so, it is essential to import the Microsoft GPG key to verify the authenticity of the installation package.

curl -fSsL https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --dearmor | sudo tee /usr/share/keyrings/vscode.gpg > /dev/null

To import the Microsoft Visual Source Repository, use the following command in your terminal.

echo deb [arch=amd64 signed-by=/usr/share/keyrings/vscode.gpg] https://packages.microsoft.com/repos/vscode stable main | sudo tee /etc/apt/sources.list.d/vscode.list

Step 4: Install Visual Studio Code

Once the source repository has been added, it is necessary to refresh your apt package manager sources list before the installation of Visual Studio can proceed. Use the following command in your terminal to update the sources list with the new repository.

sudo apt update

The next step is to install the desired version of VSCode, with most users opting for the stable version. However, for those who want to test the latest features, the insider’s build (beta version) can be installed instead.

Install Visual Studio Code stable with the following command.

sudo apt install code -y

Alternatively, you can install the Visual Studio Code insiders build with the following command.

sudo apt install code-insiders -y

Step 5: Launch Visual Studio Code

With the installation now complete, you can open the software. One way to quickly launch it is by using the command line terminal and entering the following command.

code

Users of the insider build can use the following command instead.

code-insiders

For desktop users who prefer not to use the command line terminal, the best way to open VSCode is through the GUI by following the path.

See also
How to Install .NET Core SDK on Fedora Linux

Taskbar > Programming > Visual Studio Code {Version}

Example:

You’ll be presented with the main interface when you open Visual Studio Code for the first time. This interface is designed to be intuitive and easy to use, with all of the features and tools that you need to get started with coding. Some of the things you might want to check out include the menu bar, the sidebar, and the code editor. The menu bar provides quick access to all of the features and settings in the application, while the sidebar provides access to your files and projects. The code editor is where you will do most of your work, and it includes many useful features such as code completion, syntax highlighting, and debugging tools.

Example of Visual Studio Code on Linux Mint:

Congratulations, you have successfully installed Microsoft Visual Studio Code on your Linux Mint system.

Additional Commands & Tips

Update VSCodium

To check for updates using the command line, you can use the following command, which will check for updates across all APT packages.

sudo apt update && sudo apt upgrade

Remove (Uninstall) Visual Studio Code

To remove Visual Studio from your system, use the following command in your terminal.

sudo apt remove code --purge

Please note that using the –purge flag will remove all data associated with VSCode.

Next, you can remove the Insiders build by itself or with the stable build.

sudo apt remove code-insiders --purge

After removing the software, use the following command to remove the repository.

sudo rm /etc/apt/sources.list.d/vscode.list

For good housekeeping and security, removing the GPG key is recommended by using the following command.

sudo rm /usr/share/keyrings/vscode.gpg

Comments and Conclusion

And there you have it! You now know how to install Visual Studio Code on Linux Mint easily. The process may seem a little intimidating at first, but it’s quite simple once you get the hang of it. Remember to update your system, import the repository and gpg key, and then run the installation command. And if you ever need to remove or update the software, the commands are also provided. With Visual Studio Code on your Linux Mint, you’ll have a powerful code editor that can help you write better and more efficient code. Happy coding!

Leave a Comment

Share to...