I have a laptop running Windows 10 and Ubuntu. I'm studying programming based on the .NET framework, so I need to run Visual Studio. I'd like to either somehow, install Visual Studio in Ubuntu or run a Windows VM from Ubuntu. Is it possible to run the already installed OS from a VM and keep them both side by side? Thanks!

  • Is your goal is to run Windows in a VM without paying for a new Windows license, or is your goal something else? Visual Studio Code is available for Ubuntu as a Snap. Or did you really want full Visual Studio? – user535733 Aug 13 at 19:29
  • 1
    Your idea of using the same Windows alternately from the virtual machine and from the computer is not new. Theoretically this is possible but with many tasks to accomplish and potential problems each time Windows starts up. – cmak.fr Aug 13 at 20:29
  • 1
    This ^^^. Too many problems and certainly more complex than what someone asking such question could do. – GabrielaGarcia Aug 13 at 21:31
  • Do you need the IDE or is Visual Studio Code enough? – mchid Aug 14 at 9:02

If you don't need the IDE you can install Visual Studio Code on Ubuntu.

First, click here to visit the download page for Visual Studio. Scroll down and click on the box that says "deb" and "Ubuntu".

Next, assuming you downloaded the file to your ~/Downloads directory, run the following commands:

sudo apt update
sudo apt install gdebi
sudo gdebi ~/Downloads/code*amd64.deb 

Alternatively, you can install the vscode from the snap store by running the following commands instead.

Run the following command install the stable version:

sudo snap install code --classic

Alternatively, you can install the unstable version by running the following command instead:

sudo snap install code-insiders --classic

Click here for more info about Visual Studio Code at the snap store.

Click here for more info about Visual Studio Code - Insiders at the snap store.

  • GabrielaGarcia you shouldn’t underestimate the abilities of people you don’t know... people can often surprise you! The idea is to avoid restarting the computer every time. I need to use the visual studio because I’m studying programming in C# with GUI. Which I can’t do with VS code. As cmak.fr said, I know that it can potentially cause problems because if I change something in the VM it would affect the real machine, like a login password. I’d like to be able to work with VS without reinstalling it completely. – Mariano Aug 14 at 21:47
  • @Mariano Make sure you have a CD or a USB ready to reinstall windows before you begin as you may need to reinstall windows if things go wrong and you may also lose all of your files as well. This answer may be what you are looking for: unix.stackexchange.com/a/31276/70847 – mchid Aug 14 at 22:58
  • @Mariano Although, if you just don't want to reboot into Windows every time, you may want to look into using one of these windows virtual machines: developer.microsoft.com/en-us/windows/downloads/… – mchid Aug 14 at 23:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.