I just downloaded
VSCode-linux-x64 from the Microsoft website. It's a 62 MB zip file. How can I install it on my Ubuntu system?
VSCode is now available as DEB file. You can download it and then run:
sudo dpkg -i ~/path/to/code_1.XXX.deb
dpkg complains about missing dependencies, run:
sudo apt -f install
afterwards to fix the problem.
- Download Visual Studio Code for Linux
- Extract it:
unzip VSCode-linux-x64.zip -d ~/path/to/VSCode
- Run the
codeexecutable to open Visual Studio Code
- (Optional) Create a symbolic link to conveniently run
codefrom the terminal:
sudo ln -s /path/to/VSCode/code /usr/local/bin/code
Source (install instructions): https://code.visualstudio.com/docs/setup/linux
Visual Studio Code enabled official Linux repositories on February 2017 (v1.10)
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EB3E94ADBE1229CF sudo add-apt-repository -y "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" sudo apt -y install code
You can upgrade / dist-upgrade as usual
sudo apt -y upgrade sudo apt -y dist-upgrade
Now there's a .deb package for Ubuntu and Debian besides the rpm/zip. It is available here and may be installed as usual:
sudo dpkg -i vscode-amd64.deb
Works fine on Xenial. Maybe someone creates a PPA to simplify updates. Or it 'll become part of the official repository.
Update 03/17: Since version 1.10 (February 2017) there is built-in support for official Linux repositories. VS Code now can auto-update on Linux, although you have to install it one time manually.
Since they provide a
.deb file now I recommend using that instead of the approach below.
The way I've done it is as follows. Using a terminal:
Create a directory for the files and change to this directory:
mkdir msvs && cd msvs
The directory name is arbitrary.
Unpack the zip file in your new folder:
Run the ide using
You can also create a desktop link so that you can start it directly from the desktop or double-click in nautilus.
To create a menu entry:
At the terminal, create a file
sudo gedit /usr/share/applications/MSVS.desktop
and copy and paste the following:
#!/usr/bin/env xdg-open [Desktop Entry] Version=1.0 Type=Application Terminal=false Exec=/opt/msvs/code Name=MSVS Icon=/opt/msvs/flurry_ios_visual_studio_2012_replacement_icon_by_flakshack-d5nnelp.png Categories=Development
In my case the executable resides inside
sudo cp -R ~/Downloads/VSCode-linux-x64 /opt/msvs
I also downloaded an MS icon for this application from
and moved it to
sudo mv flurry*png /opt/msvs
Visual Studio Code doesn't have to be installed, per se. Instead you can unzip the archive wherever you want it, then run the program by double-clicking the file called
code (which is the main executable).
Here's a GUI-oriented procedure for doing so:
Make a new folder where you want Visual Studio Code to go. It's best to do this within your home folder (if other users want to use Visual Studio Code, it could be extracted separated for them--then any modifications or configuration changes will be per-user).
This destination folder should be empty, as the
.ziparchive provided for download does not have everything in a top-level folder inside. For example, if you put software installed for your own user in
~/opt, you could create a new folder inside there called
Right click the downloaded .zip file and click Extract To..., then select the folder you created.
If you prefer, or if your file browser doesn't show an Extract To... option, you could instead move the .zip file into the destination folder, right-click the icon, and click Extract Here.
To run Visual Studio Code, double-click on the
codeexecutable, which is one of the files that was extracted.
Currently Visual Studio Code is "preview" software, which means it is still being developed and is not yet fully stable. Therefore you might prefer to launch it from a terminal so that you can see possibly useful errors and warnings. To do that, open a Terminal window (Ctrl+Alt+T),
cdto the directory where you extracted it, and run
Installing VS Code on Ubuntu
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
This will download the gpg key and copy and make the apt files. Then you can simply update and install vs code:
sudo apt-get update sudo apt-get install code
BTW, VS Code will be a standard package in Ubuntu 18.04 (end of april 2018)!
.debVSCode package from here
- Install downloaded package using
I can't comment on the correct answer above (using PPA as of February), so I will add another detail here.
Visual Code depends on libgtk2.0-0 which it does not list as a dependency in the meta data. You might come across this problem if you, like me, setup minimal virtualbox installations just to troubleshoot difficult system level problems where you have to hack and slash packages which you don't want to do on your real host.
On minimal hosts, therefore the following is required in addition to what was mentioned above to get Visual Code to run:
sudo apt install libgtk2.0-0
From Visual Studio Code's official docs:
- Download the .deb package from this page.
- Run the following command:
sudo dpkg -i ~/path-to-file.deb
- If you get dependency errors when using dpkg with a package, run:
sudo apt-get install -f
Note: Installing the .deb package will automatically install the apt repository and signing key to enable auto-updating using the regular system mechanism.
You can use new FLATPAK (flathub) repository to install on any linux distribution https://flathub.org/apps/details/com.visualstudio.code
FLATPAK automaticaly updates installed packages.
Download the Powerbase installer script for Visual Studio Code
Change to your download directory (probably
Run the installer script. If there are no errors, it will just exit…
That’s it. Nothing special about this one and it should work in any Linux distribution. Just open your launcher and start typing Visual Studio Code.