Hello all, this is a post about how to get a VM (virtual machine) on your computer that can run linux. I made his due to some interest in another thread involving a program that needs linux to run. Some things you should understand first:
A VM, for those who don't know, is a computer within a computer. Meaning, is is essentially separate from your computer. If a virus infects your VM, you just delete the VM and it's as if nothing happened. That's why VMs are sometimes preferred to test programs that may be questionable.
Don't give your VM too much ram, the ram he VM uses is not available to your host computer when the VM is active.
Linux is not a set in stone OS hat you go to the Linux site and download, it is a kernel that is used to develop many other Operating Systems, including Android. For this VM, we will use Ubuntu, which is considered one of the best linux based systems out there. It's also completely free.
This "tutorial" will have LOTS of pictures. so it's long. Here we go...
So i'm at my desktop. Notice I have a windows computer. SO some of the choices i make in terms of download will be different than mac users:
Open up a web browser. I like chrome.
go to
virtualbox.orgNavigate to downloads:
click on the one that you need. I have windows, so i got the one for windows. If you have mac, select the proper option.
Ok, so let it download and run it. Installation will come up. just use the wizard to install. I already have it installed, so i'm not going to run through it again. It's self explanatory though, just let the wizard do all the work.
Back to google:
Go to
ubuntu.com. Ubuntu is the version of linux we will be using because it is so popular.
Go to downloads:
click the Ubuntu desktop link:
IMPORTANT! MAKE SURE YOU ONLY DOWNLOAD 32 BIT! I made the mistake of downloading 64 and that did not work out well.
Click the button.
Don't worry! you don't have to pay, it's a
suggested contribution. Just scroll down and click "not now."
so it will download the OS onto your computer. save it somewhere where you can readily access it.
Back to the desktop. Open up Virtual Box. let's make ourselves a VM
Notice i already have a VM made. Your screen will look different, it will say that you have no VMs yet, etc. Click "new"
A little screen will pop up. This will be the wizard that will help you create the VM.
Type in a name. Note i actually named mine "type a name here" so later on, you will see things referred to as "type your name here" because that is the actual name of this VM, not because you have to change the name there or something. Don't worry, it'll be clear in a sec.
For Type and version, chose Linux and Ubuntu
Now for memory. I hope you guys have decently new computers with a good amount of memory. You don't want to allocate so much memory that your host computer will suffer when the VM is running but your VM should have a decent amount of memory also. I have 4 gigs of ram, and i'm allocating what VB recommended, 512 mb. use your judgement here.
Now you have to create your virtual hard drive. select "create virtual now" and "dynamically allocated"
Now select how much storage you can give it. I hope all of you have modern amounts of storage with at least a good 500 gigs or so. you MUST be able to spare at least 6 gigs of space for your VMs use. if you can, 8 gigs is a good amount. This is where i said before about the name thing. the box that says "type some name here" will contain the name of your VM, no need to change it.
Hit create...
Hooray! you have a VM. That was the hard part. Now though, you have to install the OS on the vm so you can actually, you know, use it. Click on the VM. I'm going to click on the one i just created, you will have only one made.
Click on the little file picture. Navigate to where you saved your O.S. previously. Notice i have 2, one is 32 bit that i called "this one" when i was saving and the other was 62 bit. The 62 bit VM failed to word, i had to delete that one and make another one with the 32. Click on the file and hit open.
Hit start...
Almost there! Hit install.
I just checked the download updates button. If all requirements are met (they should be) then you just hit continue.
And again. Note that when it says "erase disc," it's not going to delete your hard drive.
Hit install now.
Now, the O.S. is going to be installed. As it installs, it will ask some questions such as locations and keyboard style. just answer all of these. Then you get to the screen where you name the computer and give it a password. Fill this all in.
Let it finish up...
And viola! you now have a computer within a computer!
Phew, that was long. But now you know how it's done. Just a note, you can't really send files from your computer to the VM because they are treated as different machines, i believe there is a drag and drop option you can select in the settings though. You can always download something off the internet from the VM and get it that way. Also, you can get browsers like chrome, you just have to download them and install them. You can always run the VM from virtual box. Also, when you close out of the VM, don't EVER select power down as this this is like pulling the power cable, it can cause damage. Only use that when the VM is crashing or something. Also, save state doesn't seem to work for me. I recommend always shutting down. if you save state and encounter a problem, just right click and select "discard saved state." if a VM ever needs to stop existing (e.g. you test a program that contains a virus and compromises the VM) you just right click the VM in virtual box and click "remove" and make sure all files are removed. Problem solved.
Of course, you can also make VMs using windows Os and Mac OS as well as solaris or any other linux based OS, the options are limitless.
I hope this helped and that everyone could understand it.
Enjoy!!