How to install VS Code in Linux Mint using terminal?

Heyan Maurya
5 Min Read

Visual Studio Code (VS Code) is one of the best IDEs loved by hundreds of developers because of its speed, versatility, and many extensions. So, if you are on Linux Mint and want to install VS Code, the terminal provides a quick and efficient way to set up apps. In this tutorial, we’ll take you through the process step-by-step.


Why Install VS Code on Linux Mint?

VS Code is an excellent choice for developers and coders due to its:

  • Lightweight Design, hence, doesn’t consume excessive system resources.
  • It offers a massive library of extensions and lets you customize it to suit your needs.
  • Cross-platform compatibility means it is available for Linux, Windows, and macOS.
  • Built-in Git Support

Installing VS Code on Linux Mint is straightforward, and you’ll have it up and running quickly.


Step-by-Step Guide to Installing VS Code

Step 1: First, Update Your Linux Mint

Open the command terminal on Linux Mint by either using the keyboard shortcut, i.e., Ctrl+Atl+T, or searching for it in the Application menu. After that, execute the system update command to ensure all packages and dependencies are current.

sudo apt update && sudo apt upgrade


Step 2: Install Required Dependencies

To ensure a smooth installation, install the dependencies required for VS Code. This command ensures your system can handle HTTPS repositories and additional software sources.

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


Step 3: Add the Microsoft GPG Key

Next, add Microsoft’s GPG key, which is used to verify the authenticity of the VS Code package. Run the following command:

wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg

This step ensures secure communication with the Microsoft package repository.

sudo install -o root -g root -m 644 packages.microsoft.gpg /usr/share/keyrings/

Step 4: Add the VS Code Repository

Now, add the official Microsoft repository for Visual Studio Code to your Linux Mint system. This will tell our system where to find the VS Code package when we want to install it.

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


Step 5: Update Your Package List Again

After adding the new repository, update the Linux Mint package list to include the VS Code package, and the system can know about it.

sudo apt update

Step 6: Install Visual Studio Code on Linux Mint

We have configured everything required to get the “Vs Code” IDE on Linux Mint. Now, let’s use the APT package manager and run the final command in the terminal, which will automatically download and install Microsoft’s free and open-source Visual Studio Code and its dependencies on our system.

sudo apt install code


Step 7: Launch VS Code

Once the installation is completed, you can launch VS Code on Linux Mint from the terminal by typing the command. Alternatively, you can find it in your application menu under Development.

code
How to install VS Code in Linux Mint using terminal

Optional: Keep VS Code Updated

Since you’ve added the Microsoft repository, VS Code will be updated automatically whenever we run the system update command. It will ensure we always have the latest features and security updates.

sudo apt update && sudo apt upgrade -y


Tip – Do you want to remove the VS Code?

If you ever want to uninstall VS Code from Linux Mint along with the added repository, use the following given syntaxes.

# To remove the application:

sudo apt remove code

# To delete the added Microsoft repository as well:

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

Conclusion

So, we have seen in the article that installation of Visual Studio Code on Linux Mint using the terminal is not that difficult if we have properly integrated the Microsoft repository meant for Visual Code Studio. Hence, if you are a beginner, then using the steps of this tutorial, you will be able to experience VS Code, which provides the tools you need to write, debug, and manage your code efficiently.

Leave a Comment

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.