Install Visual Studio Code on Linux Mint 22|21

Visual Studio Code is a powerful lightweight source code editor used in building and debugging web applications. It runs on desktop and is available for Linux, Mac and Windows operating systems. It has built-in support for Node.Js, Typescript and Javascript but can also be used with other languages including PHP, Python, C#,C++,Java and Go and runtimes such as Unity and .NET.

Install Visual Studio Code on Linux Mint 22|21

Installing Visual Studio Code in Linux Mint 22 is easy because it already includes a package repository for installation.

First, update system repository.

sudo apt update -y

Next, install HTTPS support to enable retrieving of packages.

sudo apt install curl apt-transport-https

Add Microsoft Visual Studio Code repository and signing key to your Linux Mint by running the following commands:

sudo apt-get install wget gpg
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg
echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" |sudo tee /etc/apt/sources.list.d/vscode.list > /dev/null
rm -f packages.microsoft.gpg

Update your system again and install Visual Studio Code.

sudo apt update -y
sudo apt install code -y

Once instalation is complete, Visual Studio Code will be available as part of your applications.

Launch the Visual Studio Code program and start using it!

How do I Install Visual Studio Code Plugins?

There are plugins that integrate with Visual Studio Code to make development more interesting and easier. In this guide, we are going to look at integrating Docker and Python with Visual Studio Code.

Docker Visual Studio Code plugin

How does Visual Studio Code works with Docker plugin?

Docker is a runtime for building containerized applications. It is has made it easy for developers to build and ship containerized apps. Integrating with Visual Studio Code will enable developers to directly use it while coding in Visual Studio Code, and they will be able to package their apps into images that can run on any other system that has Docker or any supported container engine installed. To be able to use Docker on Visual Studio Code, you need to install Docker and Docker compose on you development environment. Check our previous guides on how to install Docker and Docker Compose Linux Mint 22.

Once you have Docker and Docker Compose installed and have Visual Studio Code also installed, launch Visual Studio Code, click extensions section (left pane) and look for Docker.

When you install Docker, you will notice on the left pane that a Docker logo has appeared. On clicking it, it opens Docker explorer showing Images, Containers and registries.

Docker commands will also be added to command palette. You can view these commands by opening command palette under view and typing docker.

You can now start using Docker plugin in Visual Studio Code!

Python Plugin for Visual Studio Code

How does Python plugin works in Visual Studio Code? Python is one of the easiest languages to learn. Here, we will see how to set up python and use inside Visual Studio Code. First, you need to have python installed on your system and a local development environment set. If you do not have python already, follow the steps below:

Download and install Python3.12.3:

wget https://www.python.org/ftp/python/3.12.3/Python-3.12.3.tgz
tar -xvf Python-3.12.3.tgz
sudo apt update
sudo apt install build-essential checkinstall -y
sudo apt install -y libreadline-gplv2-dev libncursesw5-dev libssl-dev
sudo apt install -y libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
sudo apt install -y python3-dev
cd Python-3.12.3
./configure
sudo make install
sudo apt install -y python3-pip python3.12-venv

At this point, python3 has been successfully installed in your system. You can verify by checking Python version.

python3 --version

To check how python works with Visual Studio Code, create a directory for your virtual environment. Create a sample project, in my case i call it my_env. Activate your virtual environment.

mkdir venvs
cd venvs
python3 -m venv my_env
source my_env/bin/activate

In the virtual environment, create a “Hello World!” program as a test program. Use your favorite file editor.

vim hello-01.py

And add the following content:

print("Hello World!")

Once Python is installed, launch Visual Studio Code. On the left pane, search for Python and install the extension. It will ask you to choose your Python interpreter.

After that go to file -> open then open the directory that you were working on. In my case, it is venvs. Once you open, you will see it open on your Visual Studio Code on the left pane with its content.

You have successfully installed Visual Studio Code in Linux Mint 22|21 and have incorporated Docker and Python plugins. Enjoy your coding!

More of your Linux installations guide below:

Join our Linux and open source community. Subscribe to our newsletter for tips, tricks, and collaboration opportunities!

Recent Post

Unlock the Right Solutions with Confidence

At CloudSpinx, we don’t just offer services - we deliver clarity, direction, and results. Whether you're navigating cloud adoption, scaling infrastructure, or solving DevOps challenges, our seasoned experts help you make smart, strategic decisions with total confidence. Let us turn complexity into opportunity and bring your vision to life.

Leave a Comment

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

Related Post

Businesses are increasingly dependent on technology for managing sensitive information and conducting crucial transactions. However, this reliance exposes them to […]

Microsoft SQL Database is a relational database management system developed by Microsoft. Initially it could only run on a Windows […]

Javascript is a flimsy interpreted programming language used to make network-oriented applications. It is among the most common and flexible […]

Let's Connect

Unleash the full potential of your business with CloudSpinx. Our expert solutions specialists are standing by to answer your questions and tailor a plan that perfectly aligns with your unique needs.
You will get a response from our solutions specialist within 12 hours
We understand emergencies can be stressful. For immediate assistance, chat with us now

Contact CloudSpinx today!

Download CloudSpinx Profile

Discover the full spectrum of our expertise and services by downloading our detailed Company Profile. Simply enter your first name, last name, and email address.