No matter how much we love Linux, we all must run Windows and Windows applications sometimes–so here are two easy ways to run Windows from within Linux.
Run Windows From Within Linux Using Full Virtualization
The most common and most reliable way to run Windows from within Linux is using full virtualization provided by VMWare, VirtualBox, and Parallels. The virtualization software pretends to be an entire computer, so you can run any operating system within it.
Pretending to be a computer, called emulation, means virtualization software needs to perform in software some tasks real computers can perform in hardware. This makes software running in the virtual environment run slower than software running on a real computer.
Recent advancements in CPU and motherboard design eliminate most of this speed difference. Computers with this support include a hypervisor–a special mode that allows your single computer to pretend to be several virtual computers.
Without a hypervisor, you can expect software in a virtual environment to run about 20% slower than it would on a real computer. With a hypervisor, you can expect it to run only about 5% slower.
Besides being slower, a second disadvantage of virtualization software is that it takes time to setup and can be too difficult for Linux beginners to use–and it’s Linux beginners who most often need to run Windows from within Linux.
The biggest disadvantage of virtualization software for some users is that it requires a full licensed copy of Windows. If you don’t have an unused copy of Windows handy, you can’t use virtualization.
The Three Advantages of Using Virtualization Software to Run Windows From Within Linux
Virtualization lets you use a full version of Windows on Linux. Almost anything you can do on Windows regularly, you can do on a virtualized Windows–the only exception is playing hardware-accelerated games. Nobody will ever know that you use Linux if you work with them from your Windows virtual environment.
The second advantage of virtualization is that you can run Windows from within Linux whenever you need it, pause it the second you don’t need it, and resume it the moment you need it again. Even if you reboot Linux, Windows will never know–it will remain paused but ready for action.
The third advantage of virtualization is that you can run an unlimited number of Windows instances on your computer simultaneously–provided you have the CPU power required and the Windows licenses necessary. Many large businesses, like Amazon.com, run thousands of virtual Windows servers from within Linux.
How To Run Windows From Within Linux Using Virtualization
The software we suggest is Oracle VirtualBox, an open source program available for immediate installation in most major Linux distributions. To install, search your distribution’s package manager for “virtualbox.” (In some distributions based on Debian, the package is called virtualbox-ose for VirtualBox Open Source Edition.)
If you can’t find Virtual Box packages for your distribution, check the download page on virtualbox.org. There you will find free official images from Oracle for over a dozen different distributions.
VirtualBox needs to compile special Linux kernel modules. It will do this automatically when you install the VirtualBox package, but if you don’t have all the necessary software, just follow the instructions VirtualBox prints on the screen to install the extra software.
Before you start VirtualBox, insert your Windows installation CD into your CDROM drive.
Start VirtualBox from your system menu or from the command line. Click the New button in the top-left of the screen. Choose your version of Windows from the menu that appears (you can also install various different Linux or BSD distributions–but you will need the installation CDs for whatever operating system you choose). Continue to follow the menus–none of the choices will damage your computer and you can always change your mind later.
After you finish creating a new Windows “guest” system, you’ll be returned to the main VirtualBox screen. Click the Start button to start Windows for the first time. The First Time Wizard will start and ask you for the CDROM drive which has the Windows CD. Choose the drive, click continue, and install Windows just as if this were a real computer.
After you finish the install, Windows will attempt to reboot; VirtualBox will ask you if you want to reboot–say Yes and you’re done. Now you’re running Windows from within Linux. Use the File menu in VirtualBox to start, stop, or pause Windows anytime.
The Easier Way To Run Windows From Within Linux
If you just need to run a Windows program or two from within Linux, try WINE. WINE, which stands for Wine Is Not an Emulator, is a Windows compatibility layer. It uses legal reverse-engineered Windows Application Programing Interfaces (APIs) to fool Windows programs into thinking they’re running on Windows when they’re really on Linux.
The biggest advantage of WINE is that it doesn’t require a Windows license. It’s also easy to use–if your program works with WINE. Unlike virtualization, not all programs work with WINE, especially the most recent programs for Windows 7. And, if a program doesn’t work, there’s not much you can do unless you’re a programmer.
WINE may not support every program, but it does support all the most popular programs: Microsoft Word, Microsoft Excel, Microsoft PowerPoint, Microsoft Outlook, Microsoft Access, Microsoft Internet Explorer (version 6 only), Adobe Photoshop, Quicken, Windows Media Player, and iTunes for Windows.
Because WINE runs native Linux code, it runs programs as fast on Linux as they run on Windows. This makes it ideal for gamers–here are just a few of the games supported by WINE: Call of Duty, Civilization (IV and V), Counter-Strike, EVE Online, Half-Life (1 and 2), Spore, Steam, and World of Warcraft.
How To Install and Use WINE
WINE is packaged for every major Linux distribution. Just search for “WINE” in your distribution’s package manager and install it.
After WINE is installed, open a terminal and type the following command:
You can substitute any Windows program name for NOTEPAD.EXE. If you want to install a program from CD in WINE, insert the CD into your drive and wait for your distribution to automatically mount the CD. Then tell WINE to run the setup command. For example:
The Windows install program will run like it normally does and all program files will be installed into the directory
.wine in your home directory. After the program is fully installed, you can create a launcher in GNOME or KDE that points to your program so you can start it from your desktop. For example, I have a launcher that runs:
/usr/bin/wine /home/harding/.wine/drive_c/Program Files/Internet Explorer/iexplore.exe
Although a little setup is required whether you use WINE or virtualization, you’ll quickly find that it’s very easy to run Windows from within Linux.