Visual Studio Code is an open source code editor for Windows, Linux and macOS, developed and maintained by Microsoft.
Internally it's based on the Electron framework, runs the same Blink HTML layout engine found on any Chromium based browser. As of it's Linux version, the GTK+ toolkit is used for rendering other visual components.
There's also no lack of extensions and themes for Visual Studio Code, like it's other counterparts, Atom and Sublime Text.
No doubt that it's a quite usable code editor with tons of modern feature, also opens up faster compared to Atom. So here's how to install Visual Studio Code on Linux, lets get started.
Contents
Download Visual Studio Code For Linux
Pre-compiled binary packages in .deb and .rpm format are available for download from the official Visual Studio website.
Obviously if you're using a Debian based distribution like Ubuntu, download the deb package. Or get the rpm package if you're using any of Linux distro which uses rpm for package management.
Both of these packages are pretty self contained, I mean there's very little dependency on other package. As example the deb package depends upon only 7 other packages, which are already installed on most systems.
If you're not using any Linux distro which has dpkg or rpm package management, then there's also a tar.gz package containing compiled executable binaries. You can extract that and use Visual Studio Code from there.
Install Visual Studio Code for Linux
The installation process should be pretty easy, even for very recent Linux users. Here we've only one package to install, and there's not much package dependency at all to cause any problem.
So, on any Debian based system, install it with the dpkg command. Assuming that you've already downloaded the proper deb file, under the ~/Downloads
directory.
cd ~/Downloads/ sudo dpkg -i code_1.19.2-1515599945_amd64.deb sudo apt-get install -f
There's a little hack while installing, just type sudo dpkg -i code
and hit the Tab key to avoid typing the exact package name. It should automatically complete the package name.
On any Linux distribution with rpm package manager, you can install it like below.
cd ~/Downloads sudo rpm -ivh code-1.19.2-1515600099.el7.x86_64.rpm
If there's any dependency problem, you can check it with rpm -qpR code-*.rpm
and install them manually.
Testing Visual Studio Code
You can directly run the code
command from a Linux terminal to directly start the code editor application.
Alternatively you can also use the application launcher menu to launch the Visual studio Code editor.
The above screenshot is a sample, how the launcher looks on LXQt desktop.
After launching it for first time, the app should open up a web browser and take you to the documentation page, which is quite sufficient to learn basic usage.
Uninstalling Visual Studio Code
If you're feeling that you're done with this application, there's no need to keep it installed then again use dpkg.
sudo dpkg -P code rm -rf ~/.config/Code/
The above two commands should remove the VS Code application and all of it's generated data.
Conclusion
So, that's all about how you can install visual studio code editor for Linux, and how you can uninstall it as well.
Of course it's a great great code editor, specially when you're from a Windows background, and used to use Visual Studio. But there's no lack of native code editors or IDEs on Linux too, Atom, Sublime Text, Eclipse are few of them.
Hope it's enough to kick start your code development with Visual Studio for Linux, Just leave a comment if you have any suggestion or question.
Leave a Reply