Programming on Ubuntu has many advantages than on doing it on Windows. Because Ubuntu sports a many programming language compilers out of the box and there is no need to install them additionally. I am not saying Ubuntu is better than Windows but while in some cases it is. And Microsoft knows this and that’s why Microsoft allows you to run Linux bash shell inside in Windows 10 Anniversary update (14393). But today’s post is not about that.
In today’s post, I am going to show you how you can easily set up Ubuntu as guest OS in VirtualBox. But first, a fall What is VirtualBox?
What is VirtualBox?
VirtualBox is the product of Oracle company which allows you to run an entire operating system inside another operating system.
To install Ubuntu on VirtualBox you will, of course, need a VirtualBox software. And one more thing Ubuntu ISO file for installation. You can download both of them from following links. And also I will suggest installing VM if you have at least 4 GB of RAM.
1. Install Oracle VirtualBox software on your system. Double click on setup file you downloaded previously to start the installation. While installing, setup will ask you to install some additional drivers on your system at that time click on install (it’s safe to install).
2. After installation VirtualBox will start automatically. If not, then double click on the shortcut to start it.
3.Then in VirtualBox application click on ‘New’ on left upper corner to set up a new machine.
4. After you click name your Virtual Machine you can name it whatever you want in my case I am simply naming it to ‘Ubuntu’. After you name it to click on next button.
5. On next window, it will ask you how much maximum RAM your virtual machine can use from your actual RAM.
6. This is different for the different user as per their RAM on their machine. It’s recommended to have minimum 2 GB of RAM on your machine to use Virtual Machine. And now a day everyone has at least 4 GB of RAM on their machine so not a problem at all. My suggestion is if you have 4 GB of RAM then give 2 GB (2048 MB) RAM to your virtual machine if you have 8 GB of RAM then you can give (3.5 to 4 GB) RAM to your virtual machine. Note that this is maximum RAM.
7. After your setup RAM for your machine click on next button then click on next, next then create and then finish.
8. After your setup all these things you will see your machine on the list. Right-click on it and click on settings.
9. Then head over to the display tab and configure your settings as per below screenshot.
10. Then now in storage tab click on empty under Controller: IDE and then on the right-hand side in under attributes click on that small disk icon and then click on choose virtual optical disk file.
11. Then now select the ISO file of Operating system that you have downloaded and click OK. In my case, I am using 64 bit of Ubuntu ISO file.
12. Then head over to network tab in settings. In that change Attached to -> bridged adapter. And finally, click on the Ok button of settings tab.
13. And now we are ready to start our virtual machine. Click once on your virtual machine and from the upper menu click on start button. And wait for some seconds to start.
14. After VM started it will ask you to ‘try Ubuntu’ or ‘Install Ubuntu’. Click on install Ubuntu. On next window, setup will ask you to install third-party software check that box and click on continue.
15. Then on installation type window check the first box of ‘Erase disk and install Ubuntu’ and click on continue. Don’t worry it’s not going to wipe out your all HDD. Then click on continue on next small window.
16. On next step type your location and click on continue button. On the keyboard, setup clicks on continue.
17. Then on ‘Who are you’ window type your name, username that you want then enter your password twice and hit on continue. And done. And now installation has been started wait for some time until installation finishes.
18. After installation done it will ask you to restart your machine. On that step click on file menu of VirtualBox (refer screenshot) and then close. And then double click on the power of the machine.
19. And now again head over to the settings of VM and then in storage tab click on Ubuntu ISO file under Controller: IDE and then click on small disk icon at the right-hand side and click on Remove disk from virtual drive. And then OK. And again start your VM.
20. Then enter your password to log in.
After you logged in click on Devices menu in VirtualBox and then click on last option.
21. Then OS will ask you to install software from disk at that time click on Run. Then type the password for authentication. And wait until installation finishes.
22. And then again the power of the machine and restart it and you’re are done.
And now you can do all your stuff on Ubuntu that you want to do.
So this is the full and steps wise guide on how you can easily setup Ubuntu as VM on your machine. If you face any problem doing this, please let me know in the comment section below.