Install visual studio code in ubuntu 18.04
Visual Studio Code is a source-code editor developed by Microsoft for Windows, Linux and macOS. It has built-in debugging support, embedded Git control, syntax highlighting, code completion, code refactoring, and snippets.It is highly customizable, allowing users to change the theme, keyboard shortcuts, preferences, and install extensions that add additional functionality. The source code is free and open source and released under the permissive MIT License.
VSCode is cross platform text editor and can be installed on Windows, Mac and Linux. This tutorial explains how to install Vscode on Ubuntu 18.04 Desktop operating system.
Step 1: Install packages
First we will update apt and install dependency packages with below commands.
root@linuxbox:~# apt update root@linuxbox:~# apt install software-properties-common apt-transport-https curl
Download and import the Microsoft signing GPG key using the curl or wget
root@linuxbox:~# curl -sSL https://packages.microsoft.com/keys/microsoft.asc -o microsoft.asc root@linuxbox:~# apt-key add microsoft.asc OK
And enable the Visual Studio Code repository as below
root@linuxbox:~# echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" | sudo tee /etc/apt/sources.list.d/vscode.list
Now install visual studio code
root@linuxbox:~# apt update root@linuxbox:~# apt install code
Now VS Code is installed on your Ubuntu system. you can launch it either from the command line by typing code or from graphical mode, go to Activities and click on visual studio code.
update visual studio code
When a new version is released you can update the Visual Studio Code package
through apt command.
root@linuxbox:~# apt update root@linuxbox:~# apt upgrade code
you can set visual studio code as the default editor then run following command
root@linuxbox:~# update-alternatives --set editor /usr/bin/code
you can also install VS Code via Snap pakage management.
root@linuxbox:~# apt install snapd root@linuxbox:~# snap install vscode --classic