Games

How to install VS Code on Linux Mint 20.1

Introduction to Visual Studio Code

Visual Studio Code (VS Code) is one of the most popular code editors available today. Developed by Microsoft, this lightweight yet powerful source code editor supports a myriad of programming languages and features, making it an essential tool for software developers, data scientists, and web developers alike. Its rich ecosystem offers an array of extensions, which can enhance its capabilities significantly, allowing users to tailor their development environment to their specific needs.

In this guide, we will walk you through the steps of installing Visual Studio Code on Linux Mint 20.1. By the end of this article, you will have a functioning installation of VS Code, and we’ll explore some essential features that can help kickstart your development journey.

See also  How to build a Cups Print Server on Ubuntu Mate 16.04

Pre-requisites

Before diving into the installation process, ensure that your system meets the following requirements:

  • Operating System: Linux Mint 20.1 (Ulyssa) or later versions.
  • Architecture: 64-bit architecture is recommended for optimal performance.
  • Internet Connection: While the initial installation can be done offline if you download the package in advance, having an Internet connection allows you to access the latest updates and extensions.

Methods to Install VS Code on Linux Mint 20.1

There are several ways to install Visual Studio Code: through the official repository, using a .deb package, or utilizing Snap. Here, we will delve into each method so you can choose the one that best fits your preference.

Method 1: Installing via Official Microsoft Repository

Using the official Microsoft repository is one of the most reliable methods to install VS Code, as it ensures you receive regular updates from Microsoft itself.

Step 1: Open Terminal

You can open the terminal by searching for “Terminal” in your Mint menu or using the shortcut Ctrl + Alt + T.

Step 2: Update Package Index

Before installing any new package, it’s always a good practice to update your system’s package index. Run:

bash
sudo apt update

Step 3: Install Required Dependencies

To fetch packages from an external repository, you need to ensure that your system has the required dependencies. Run the following command:

bash
sudo apt install software-properties-common apt-transport-https wget

Step 4: Import Microsoft GPG Key

To guarantee the authenticity of the packages from Microsoft repository, import the GPG key by executing:

bash
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add –

Step 5: Enable the Visual Studio Code Repository

Next, add the Visual Studio Code repository to your system by running:

See also  How to install ONLYOFFICE on Ubuntu 24.04

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

Step 6: Re-Update Package Index

After adding the new repository, update your package index again:

bash
sudo apt update

Step 7: Install Visual Studio Code

Now you’re ready to install VS Code. Type:

bash
sudo apt install code

Step 8: Launch VS Code

Once the installation is complete, you can start Visual Studio Code by typing code in the terminal or by searching for it in your applications menu.

Method 2: Installing via .deb Package

If you prefer a manual installation method without adding repositories, you can use the .deb package provided by Microsoft.

Step 1: Download the .deb Package

Visit the official Visual Studio Code website and navigate to the Downloads section. Download the .deb package compatible with your system architecture.

Step 2: Install the .deb Package

Navigate to the directory where you downloaded the package and install it using the following command:

bash
sudo dpkg -i code_*.deb

Step 3: Fix Missing Dependencies

If you encounter any missing dependencies, run:

bash
sudo apt install -f

This command will automatically resolve any dependency issues.

Step 4: Launch Visual Studio Code

After successful installation, you can launch VS Code from the terminal or applications menu.

Method 3: Installing Using Snap

Snap packages provide an alternative approach for installation that is often simpler as it handles dependencies automatically.

Step 1: Ensure Snap is Installed

By default, Linux Mint supports Snap, but if it’s not installed, run:

bash
sudo apt install snapd

Step 2: Install Visual Studio Code Using Snap

Use the following command to install VS Code using snap:

bash
sudo snap install code –classic

Step 3: Launch Visual Studio Code

Once the installation is complete, run code in your terminal or search for it in the applications menu.

Essential VS Code Features

1. Extensions Marketplace

VS Code’s rich functionality is frequently enhanced through extensions. You can access the Extensions Marketplace by clicking on the Extensions icon in the sidebar or pressing Ctrl + Shift + X. Popular extensions include:

  • Prettier: For code formatting.
  • Python: Offers rich support for Python development.
  • Live Server: For real-time previews of your web application.
See also  How to install FreeCAD on Pop!_OS 22.04

2. Integrated Terminal

VS Code comes with an integrated terminal, providing users the convenience of executing commands without leaving the editor. You can open the terminal by pressing `Ctrl + “.

3. Version Control Integration

VS Code seamlessly integrates with Git, allowing users to manage their repositories directly from the editor. You can clone repositories, commit changes, and view history without navigating away from your current workflow.

4. Debugging Tools

VS Code supports extensive debugging features and supports various programming languages, providing breakpoints, call stacks, and an interactive console to inspect your code while debugging.

5. Customizable Themes and Layouts

VS Code allows you to customize your code editor’s appearance to match your preferences. You can choose from a variety of themes in the Extensions Marketplace or create your own.

Troubleshooting Common Issues

Issue 1: Performance Problems

If you notice performance issues, consider disabling unused extensions. Access the Extensions view to disable or uninstall unnecessary extensions.

Issue 2: Missing Dependencies

Occasionally, missing dependencies may occur, particularly when installing through manual methods. Running sudo apt install -f can help resolve these issues.

Issue 3: Launch Problems

If VS Code fails to launch, ensure you’ve installed it properly. You may also try launching it from the terminal to view any error messages, helping you diagnose the problem.

Conclusion

Installing Visual Studio Code on Linux Mint 20.1 is a straightforward process, and there are multiple methods to suit your preference. Whether you choose to go through the official repository, a downloaded .deb package, or Snap, you’ll have access to one of the most robust code editors available. Once installed, the rich features of VS Code can greatly enhance your coding efficiency and productivity, making it a valuable tool for developers in any field.

FAQ

1. Can I use Visual Studio Code without an Internet connection?

Yes, Visual Studio Code can be used offline after installation. However, you will need an Internet connection to install extensions and updates.

2. Is Visual Studio Code free to use?

Yes, Visual Studio Code is completely free and open-source software, making it accessible for everyone.

3. Does VS Code support remote development?

Yes, with the Remote Development extensions, you can work on remote servers and environments directly from VS Code.

4. Can I customize the keyboard shortcuts in VS Code?

Absolutely. You can customize keybindings by navigating to File > Preferences > Keyboard Shortcuts.

5. What programming languages does VS Code support?

VS Code supports a wide range of programming languages out-of-the-box, including JavaScript, Python, C++, Java, Go, and many others. Additional language support can be added through extensions.

6. How do I update Visual Studio Code?

If you installed through the official repository or Snap, you can update VS Code by running sudo apt update && sudo apt upgrade or sudo snap refresh code respectively in the terminal.

About the author

Jeffrey Collins

Jeffrey Collins

Jeffery Collins is a Microsoft Office specialist with over 15 years of experience in teaching, training, and business consulting. He has guided thousands of students and professionals in mastering Office applications such as Excel, Word, PowerPoint, and Outlook. From advanced Excel functions and VBA automation to professional Word formatting, data-driven PowerPoint presentations, and efficient email management in Outlook, Jeffery is passionate about making Office tools practical and accessible. On Softwers, he shares step-by-step guides, troubleshooting tips, and expert insights to help users unlock the full potential of Microsoft Office.