Ubuntu Install vscode – How to Install vscode in Three Ways

ubuntu-install-vscode

Ubuntu install vscode involves understanding what vscode is and the different methods of installing Microsoft’s Visual Studio Code (vscode). Ubuntu is a preferred operating system by developers and programmers, and if you use Ubuntu, knowing how to install vscode is essential.

Notably, vscode is an open-source code editor that supports multiple languages and offers cool features, such as GIT control, easy debugging, etc. If you want to install vscode Ubuntu, this post will guide you on different installation methods.

Ubuntu Install vscode in Three Ways

Installing vscode in Ubuntu requires an Ubuntu operating system and logging in with a user with administrator privileges. Still, you must have an active internet connection during the installation.

Once you have all that, there are three methods you can use.

Let’s go through each, giving the commands to run. That way, you will choose which is easier for you.

Method 1: Ubuntu Install vscode via APT

Ubuntu offers the APT package manager that you can use to install and manage software packages. The vscode package is unavailable on the Ubuntu repository, but you can import and add its repository and install it using APT. Proceed with the below steps.

First, update your Ubuntu repository to refresh the sources list. Doing so ensures you install the latest available vscode version.

update-ubuntu-repository

Next, you must install the vscode dependencies. Unlike Snap, which bundles all its dependencies, APT requires you to install them to avoid dependency issues. You can read more on our Snap vs APT review to understand the difference between Snap and Apt.

For this case, run the below command to install all dependencies.

ubuntu-install-vscode-dependencies

After all dependencies are installed, we must import a Microsoft GPG key to verify the vscode package before installing it.

Use Wget to import the GPG key, then add it using the command below.

ubuntu-import-vscode-gpg-key

To add the vscode repository, run the command below.

Confirm any prompts that will appear during the installation process.

ubuntu-add-vscode-repository

The last step in the Ubuntu install vscode using method 1 is to run the installation command below.

That’s it. Once the process completes, vscode will be available from your installed applications. You can then open it and start working on your code.

ubuntu-visual-studio-code

Method 2: Ubuntu Install vscode Via Snap

Unlike APT, vscode is available as a Snap package, and you can source it from Ubuntu Software via the command line. If you are new to using Snap packages, read our comprehensive guide on getting started with Snap packages in Ubuntu.

To install vscode Ubuntu as a Snap, run the below command.

ubuntu-install-vscode-via-snap

That’s it! Once the command runs, vscode will be available for use.

Method 3: Install vscode Ubuntu via GUI

Although the command line is the best way to install applications in Ubuntu, you can still use GUI to achieve your goal.

In method 2, we’ve sourced vscode from the Ubuntu Software. In this section, we will source vscode from Ubuntu Software but graphically.

Start by opening the Ubuntu Software app from your applications.

ubuntu-software-open

Once it opens, click the search icon at the top and type ‘vscode.’ It will show up in the results section, as shown in the image below.

ubuntu-vscode-install

Tap the vscode, then click the Install button in the next window.

install-vscode-ubuntu

You must enter your password to authorize installing vscode on Ubuntu.

ubuntu-authorize-password

Once you enter your password, Ubuntu install vscode will initiate a progress bar will appear.

vscode-ubuntu-progress-bar

That’s how to install vscode in Ubuntu using the graphical method.

Read Also: Three ways of installing VLC in Ubuntu.

Conclusion

There are numerous benefits to using vscode as your code editor. This post discusses three methods you can use to install vscode in Ubuntu. Hopefully, you’ve found a technique that you are comfortable using and installed vscode. Happy coding!

Found this helpful? - Share it!

Leave a Comment

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

Scroll to Top