Today we are going to learn how to install and use the VirtualBox application on your Windows, Mac, or Linux computer. VirtualBox is a program which emulates a second computer, allowing you to install and use operating systems (e.g., Windows 7) on VirtualBox without having to change your computer's actual operating system.
Part1On Windows
Part1
- 1Open the VirtualBox website. Go to https://www.virtualbox.org/ in your computer's Internet browser. This is the website from which you'll download the VirtualBox setup file.
- 2Click Download VirtualBox. It's a blue button in the middle of the page. Doing so will open the downloads page.
- 3Click Windows hosts. You'll see this link below the "VirtualBox 6.1.14 platform packages" heading. The VirtualBox EXE file will begin downloading onto your computer.
- 4Open the VirtualBox EXE file. Go to the location to which the EXE file downloaded and double-click the file. Doing so will open the VirtualBox installation window.
- 5Navigate through the installation prompts. Do the following:
- Click Next on the first three pages.
- Click Yes when prompted.
- Click Install
- Click Yes when prompted.
- 6Click Install when prompted. Doing so will allow VirtualBox to begin installing on your computer.
- 7Click Finish when prompted. It's in the lower-right side of the window. Doing so will close the installation window and open VirtualBox. Now that you've installed and opened VirtualBox, you can create a virtual machine in order to run any operating system on your PC.
- Make sure that you don't uncheck the "Start" box before doing this.
Part2On Mac
Part2
- 1Open the VirtualBox website. Go to https://www.virtualbox.org/ in your Mac's Internet browser. This is the website from which you'll download the VirtualBox DMG file.
- 2Click Download VirtualBox. It's a blue button in the middle of the page. Doing so will open the downloads page.
- 3Click the OS X hosts link. You'll find this option in the middle of the downloads page. The VirtualBox DMG file will begin downloading onto your Mac.
- 4Open the "VirtualBox" DMG file. Once the VirtualBox DMG finishes downloading, double-click the file to open it.
- 5Double-click the "VirtualBox.pkg" icon. It's a brown box-shaped icon in the upper-left corner of the window. Doing so will prompt VirtualBox's installation window to open.
- 6Navigate through the installation prompts. Click Continue when prompted, then do the following:[1]
- Click Continue in the bottom-right corner of the window.
- Click Install in the bottom-right corner of the window.
- Enter your Mac user password when prompted.
- Click Install Software
- 7Wait for the installation to complete. Once you're prompted to click Close in the bottom-right corner of the window, you've successfully installed VirtualBox on your Mac.
- 8Open VirtualBox. Click Spotlight , type in virtualbox, and double-click VirtualBox in the resulting drop-down menu. Now that you've installed and opened VirtualBox, you can create a virtual machine in order to run any operating system on your Mac.
Part3On Linux
Part3
- 1
- 2Enter the installation command. Type in sudo apt-get install virtualbox-qt and press ↵ Enter.
- 3Enter your password when prompted. Type in the password that you use to log into your computer, then press ↵ Enter.
- 4Confirm the installation. Type y when prompted, then press ↵ Enter.
- 5Wait for VirtualBox to finish installing. This will take a few minutes. When you see your computer account's username appear to the left of the command line, Terminal has successfully installed VirtualBox and is awaiting further commands.
- 6Open VirtualBox. Type in virtualbox and press ↵ Enter to do so. This will prompt the VirtualBox main window to open. Now that you've installed and opened VirtualBox, you can proceed with creating a virtual machine in order to run any operating system on your computer.
Part4Creating a Virtual Machine
Part4
- 1Gather your installation disc(s) or files. When creating a virtual machine, you will need to install the operating system just like you would on a regular computer. This means that you will need the installation disc(s) for the operating system you want to install on the virtual machine.
- You can also install an operating system by using its ISO file.
- 2Click New. This will open the wizard that will guide you through the process to create your first virtual machine.
- 3Identify the operating system. On the first screen of the wizard, you will be asked to give the new virtual machine a name as well as choose what operating system you will be installing. Choose the type of operating system from the "Type" menu, and then choose which version you are installing from the "Version" menu.
- For example, if you are installing Windows 7, choose "Microsoft Windows" from the Type menu, and then "Windows 7" from the Version menu.
- If you are installing the 64-bit version of the operating system, make sure to choose the 64-bit version from the Version menu.
- 4Click Next. It's at the bottom of the window.
- 5Set the amount of RAM. You will need to designate how much of your computer's RAM will be allocated to your virtual machine. VirtualBox will automatically choose the recommended minimum amount for the operating system you selected, but you can increase or decrease this if you'd like.
- You can only go as high as the amount of RAM physically installed in your system.
- It is not recommended that you set it to the max amount, as there won't be any left for your regular operating system to use when the virtual machine is running.
- 6Click Next.
- 7Create a virtual hard drive. Select a virtual hard drive option and click Create, then click through the prompts and click Create again. Your virtual machine will need a virtual hard drive in order to install the operating system and any programs.
- Make sure that the virtual hard drive has at least enough space to install the operating system. Check the specifications for your operating system to see how much space you should allocate at minimum.
- Remember that any programs you install will also take up space on your virtual hard drive, so plan accordingly.
- The most common format for virtual hard drives is VDI (VirtualBox Disk Image).
- 8Start the operating system installation. Once the virtual machine has been configured, the wizard will close and you will be taken back to the VirtualBox main window. Double-click your new machine in the left menu, then do one of the following:
- If you are installing from a disc, insert it into your computer, click the "Host drive" drop-down box and click the correct drive letter from the drop-down menu.
- If you are installing from an image file, click the folder-shaped icon to browse through your computer for the installation image file.
- 9Click Start. It's at the bottom of the window. This will prompt VirtualBox to begin reading your disk or file.
- 10Install the operating system. After selecting the installation media, the operating system installation will begin. Installation proceeds the same way it would as if you were installing the operating system on a regular computer. See the following guides for instructions on installing the operating system of your choice:
- 11Boot up your virtual machine. Once the operating system is installed, your virtual machine is ready to go. Simply double-click the name of your virtual machine in the left menu of the VirtualBox main page to start it up. The virtual computer will boot and load into the operating system that you installed.
- Your virtual machine will run in a window. Whenever the virtual machine window has focus, any keystrokes or mouse clicks will affect the virtual machine and not your physical computer.
- 12Shut down your virtual machine. You have a couple of different options when closing your virtual machine, and each will affect the machine slightly differently. When you click the "X" in the upper-right corner of the window, you will be presented with several options:
- Save the machine state - This will save the virtual machine in exactly the state that it's in when you close it. Any programs you are running will be saved in their current state, and everything will be restored when you start the machine again.
- Send the shutdown signal - This will send a power-down signal to the virtual machine, and it will shut down as if the power button was pressed on a physical computer.
- Power off the machine - This will power down the machine as if power was cut to the computer. Nothing will be saved.
- 13Take snapshots of your virtual machine. VirtualBox allows you to copy your virtual machine's exact state, allowing you to return to that state at any time. This is incredibly useful for testing software or other configurations.[2]
- You can take a snapshot by clicking the Machine menu and selecting Take snapshot. The snapshot will be added to the list of your virtual machines on the left side of the VirtualBox menu.
- You can restore a snapshot by right-clicking the snapshot and selecting Restore. Any changes to your virtual hard drive since the time the snapshot was created will be lost when the snapshot is restored.
Community Q&A
- QuestionHow do I remove if I installed Linux?Banana HeadTop AnswererFirst: If you are still in the virtual machine with Linux installed, click the X and choose "Power off the machine". Close Virtual Box. Boot up Virtual Box. Right click the computer that has Linux installed. Choose "Remove" from the menu. Select "Delete all existing files".
- QuestionHow much RAM can be used with a VirtualBox?Community AnswerAs much as your PC has. For example, if your real PC has 4 GB of RAM, your VM has access to 4 GB of RAM, although that will not leave any RAM for the main PC functions, like the operating system.
- QuestionDoes installing VirtualBox make the computer forget the network it's currently connected to?Banana HeadTop AnswererIt does not! Installing VirtualBox will be like installing any other computer program. Your real computer will remain connected to your real WiFi and will not disconnect or forget your network. The same goes for creating a Virtual Machine. Your real computer will never be disconnected from the WiFi.
- QuestionCan I install viruses on the VM without getting a real virus?Banana HeadTop AnswererAbsolutely! One of the incredibly good uses of Virtual Machines is that they are disconnected from the outside world, so you can test new software and illegal software on them without real life repercussions. This includes system-destroying viruses. Based on your settings, the virtual machine might have completely virtual hardware and software. If you destroy the computer so much it can't start, delete the machine and create another one. This arguably the best way to test viruses, since you can create whatever type of computer you want. To summarize, yes. This is a great idea. Nothing from the virtual machine will affect your real life computer if you're careful. Just in case, scan with AV.
- QuestionWhat do I do if I installed Kali Linux with this method, but it gives an error message and black screen when I start it?Community AnswerInstall Windows 7 as it doesn't give any errors. Then you can install virtual machines again and install Kali.
- QuestionWhat do I do after I select "capture"?Community AnswerSimply click ctrl+c or use the print screen button and paste it into Paint, Word, or Notepad.
- QuestionCan XP Pro 64 be installed on VirtualBox?Community AnswerYes. As long if you're using a 64-bit PC, create a virtual machine and select it as "Windows XP 64-bit" and have the iso file of Windows XP Pro x64, then you can install VirtualBox.
Tips
- VirtualBox can be used to test software that won't work on your computer's built-in operating system. For example, if you have a Mac and you want to test a Windows program, VirtualBox provides a solution.
Warnings
- Any operating system used in VirtualBox will run somewhat sluggishly due to the sheer processing power needed to run two operating systems at once on one computer.