How to install ubuntu in windows?

Installing Ubuntu in windows is pretty straightforward. Installing Ubuntu on windows does not mean you install Ubuntu (an operating system) in windows just like you install MS Office. Instead, it says that we are going to use VirtualBox to host ubuntu in windows. To be precise, we are going to use VirtualBox (free software from Oracle) and vagrant, a free software from Hashicorp which manages the virtual machine for you so that you don’t have to worry about all the nitty-gritties. Here are the steps:

  1. Download VirtualBox from here: https://www.virtualbox.org/wiki/Downloads
    • Click the “Windows hosts” link.
    • Download it.
  2. Install Virtualbox. At the time of writing of this article VirtualBox, the version is 5.1.28.
  3. Download and install 64-bit windows version of Vagrant from here: https://www.vagrantup.com/downloads.html
  4. Now create a folder vagrant_getting_started
  5. Press
    Win + r

    key and enter

    cmd

    to open a command prompt.

  6. Navigate to the folder vagrant_getting_started you created in step 4.
  7. Now enter vagrant init This should give you this message:
    A `Vagrantfile` has been placed in this directory. You are now
    ready to `vagrant up` your first virtual environment! Please read
    the comments in the Vagrantfile as well as documentation on
    `vagrantup.com` for more information on using Vagrant.
  8. Check the folder; there should be a file named, Vagrantfile open this file in any text editor. Do not change the name of the file.
  9. Edit config.vm.box='base' to config.vm.box="ubuntu/zesty64" . There are lot of options that you can put in Vagrantfile which is detailed here: https://www.vagrantup.com/docs/vagrantfile/
  10. Now go back to the command prompt and enter vagrant up. Wait till you see this message:
    vboxadd.sh: Starting the VirtualBox Guest Additions.
    
    Could not find the X.Org or XFree86 Window System, skipping.
    Unmounting Virtualbox Guest Additions ISO from: /mnt
    ==> default: Checking for guest additions in VM...
    ==> default: Mounting shared folders...
        default: /vagrant => D:/vagrant_getting_started
  11. Now you can enter your ubuntu box using vagrant ssh.

That is it! Congratulations!

You didn’t have to tweak any settings in BIOS or google Linux forums to troubleshoot common boot issues that come with the dual boot.

Please let me know in the comments if you face any issues.