Install VSCode on Ubuntu

Install VSCode on Ubuntu 20.04

Visual Studio Code is an open-source, cross-platform code editor. Developed and maintained by Microsoft. Visual Studio Code works with many build-in features like debugging, Git support, syntax highlight, snippets and other valuable third-party extensions. Hence, It gives the developer complete freedom to customise work experience and provide a remarkably fast workflow for programmers. So let’s install VSCode on Ubuntu 20.04. Also, we covered different installation methods like Install Visual Studio Code as snap, Install Visual Studio Code from apt and Install Visual Studio Code DEB package.

Install Visual Studio Code as snap

Visual Studio Code is available in Ubuntu Snap package manager, which is one of the fastest ways to install. So if you are working with Ubuntu 16.04 LTS or later then snap is already installed. For other Ubuntu, versions execute following commands to install a snap. ( Upgrade Ubuntu to 20.04 LTS )

$ sudo apt-get update
$ sudo apt-get install snapd 
$ snap version

Snap will install some extra packages and/or upgrade packages. When everything has finished, you need to reboot the system.

We can install from either the command line or via Ubuntu Software Application. Therefore let use command line first to install Visual Studio Code.

$ sudo snap install --classic code 

Now let’s check how can install Visual Studio Code using GUI. For that open Ubuntu Software OR Snap Store and search Visual Studio Code and click Install. It will also upgrade Visual Studio in the background, whenever a new version is released.

Install VSCode on Ubuntu 20.04
Install VSCode on Ubuntu 4

Installing Visual Studio Code from apt

Let check how we will going to install Visual Studio Code from official apt repositories. So we will learn how you can install repository and key manually by executing the following scripts.

$ wget -qO- | gpg --dearmor >

$ sudo install -o root -g root -m 644 /etc/apt/trusted.gpg.d/

$ sudo sh -c 'echo "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/] stable main" > /etc/apt/sources.list.d/vscode.list'

Once repository and key installed successfully, update the package and install Visual Studio Code using

$ sudo apt-get install apt-transport-https
$ sudo apt-get update
$ sudo apt-get install code 

Install Visual Studio Code DEB package

This is standard way to install Visual Studio. VSCode also officially available as a DEB package for Debian / Ubuntu distro.

Firstly download deb package from Visual Studio Code Download and use apt / dpkg command to install it.

Download Visual Studio Code for Ubunutu and other OS
Install VSCode on Ubuntu 5

If you are using Linux distribution based on Ubuntu, like Linux Mint, Elementary OS and many more, then you need to download .deb package. For OS like Fedora or SUSE based distribution download .rpm packages. Once downloaded, execute the following commands from the file ( Downloaded ) location.

$ sudo dpkg -i visualstudiofilename.deb
$ sudo apt-get install -f  *This command tries to fix any broken packages by installing missing dependencies.* 


$ sudo apt install ./visualstudiofilename.deb


Visual studio is lightweight and should work on almost all available hardware and platforms. Visual Studio release a new version every month to introduce a new feature and bugs fixes. Generally, the platform promoted to install the new release. Now you can install the extensions as per your work requirement.

Instant Gramaer checker

Share and Enjoy !


Leave a Reply