Visual Studio Code is a source code editor by Microsoft. It is an open-source, free, lightweight, and powerful source code editor and available for Windows, macOS, and Linux. Don’t confuse with Visual Studio IDE. It is a lot different, proprietary tool by Microsoft.
VS code comes with built-in support for TypeScript, Node.js, and JavaScript. There are good number extensions available for other languages (such as C++, C#, Java, Python, PHP, Go) and runtimes (such as .NET and Unity) with powerful developer tools, like IntelliSense code completion and debugging.
Features,
- IntelliSense
- debugging
- Git commands built-in
- Extensible and customizable.
- Available for macOS, Linux, and Windows
- Robust and extensible architecture
You can refer to the official page and why VS code to know more about the features.
Install Visual Studio Code on Ubuntu
Visual Studio Code is available for Windows, Mac, and Linux operating system. Here we will show how to install on Ubuntu 18.04 virtual machine which we created using Oracle VirtualBox. Ubuntu is one of the most popular, open-source Linux Distros.
You can install VS code for Linux using .Deb or .RPM package or using the official snap package. We are going to cover all these methods. You should use only one method.
Download and Install .Deb package
1. Download .DEB package
Open Firefox or Chrome browser and download VS code for Linux from Official page. It is available as for both .deb and .rpm package for Debian/Ubuntu and Redhat/Fedora/Suse Linux Distros respectively. Click to download .deb package.
You should get a popup asking if you want to open with Software install or save. Choose Save.
2. Install .DEB package
Now, go to the download folder. Select the file. Right-click and select open with the Software install. This starts the installation.
Install Snap Package
VS Code is available as a snap package. Snap packages simplify installing, updating the software on the Linux Operating System. There are 2 snap packages available. One is VS CODE maintain by snapcrafter and other is official CODE by Microsoft. You should use the official snap package only.
1. Run below command to search the package.
$ snap find code code-insiders b7c5e104 vscode* classic Code editing. Redefined. codeverse-portal 0.3.0 craigulliott - Codeverse Display App codeverse-device-status 0.0.3 craigulliott - System health statistics and heartbeat system code 51b0b281 vscode* classic Code editing. Redefined. qr-cod
This command list downs all the matching packages.
code-insiders – It is daily built for Developer. Not stable may crash.
code – Stable one.
2. Run install command to install the package.
$ sudo snap install code --classic
3. Type code on command prompt to launch vs code.
$ code
This is how the editor looks.
Updating
Use command snap refresh to update editor if there is the newer version available.
$ sudo snap refresh code snap "code" has no updates available
Remove
Run snap remove command to remove visual studio code editor.
$ sudo snap remove code
Summary
We covered how to install Visual Studio Code in Ubuntu. So go ahead and install the VS Code on Ubuntu and enjoy coding.