If you’re a developer who requires the use of Linux, such as Ubuntu, to work from home of office, you can now install the Microsoft Visual Studio Code (VS Code) as your lightweight code editor.
The VS Code editor includes, support for Node.js, JavaScript, TypeScript, and support can be extended to many other languages, including PHP, Python, Go, Java, C#, and C++. In addition, you can also install extensions for runtimes, such as Unity and .NET.
In this guide, you’ll learn the steps to install VS Code on Linux using GUI and the Terminal. (You can also install the code editor on Windows 10 using these steps.)
- How to install Visual Studio Code using GUI on Ubuntu
- How to install Visual Studio Code with Snap on Ubuntu
- How to install Visual Studio Code using apt-get on Ubuntu
How to install Visual Studio Code using GUI on Ubuntu
To download and install Visual Studio Code, use these steps:
-
Open Visual Studio Code page.
-
Click the .deb button to download the Ubuntu installer.
-
Save the file to your device.
-
Double-click the *.deb file to launch the installer.
-
Click the Install button.
Once you complete the steps, Visual Studio Code will install, and it’ll the be available from the “apps” menu.
How to install Visual Studio Code with Snap on Ubuntu
Snap is the store that officially supports the distribution of Visual Studio Code.
To install VS Code with Snap, use these steps:
-
Open Terminal.
-
Type the following command to install Visual Studio Code on Linux and press Enter:
sudo snap install --classic code
After you complete the steps, you can start the editor from the “apps” menu. Also, when an new update is update is available, the Snap daemon will update the application automatically.
How to install Visual Studio Code using apt-get on Ubuntu
To install VS Code using terminal command, use these steps:
-
Open Terminal.
-
Type the following command and press Enter:
sudo apt-get update
-
Type the following command and press Enter:
sudo apt install software-properties-common apt-transport-https wget
-
Type the following command to import the Microsoft GPC key and press Enter:
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add –
-
Type the following command to enable VS Code repository and press Enter:
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
-
Type the following command to install Visual Studio Code and press Enter:
sudo apt-get install code
Once you complete the steps, Visual Studio Code will install on your device. If a new update is available, you should be able to update through the Ubuntu software update manager, or you can use the sudo apt update
followed by the sudo apt upgrade
command.