CSE2003: System Programming (Spring 2009)

How to setup your own Linux environment using VMware

March 15, 2009

Jin-Soo Kim
Computer Systems Laboratory
Sungkyunkwan University

This course requires you to perform most of assignments on the Linux platform. There are several reasons we are using Linux, chief among them being that there are excellent open source tools such as gcc (GNU C compiler), gas (GNU assembler), gdb (GNU source-level debugger), objdump (Object dump utility), etc. Since we have no dedicated Linux machines for this course, this page briefly introduces how to setup your own Linux environment on your Windows machine using a virtualization software freely offered by VMware Inc.

1. Download the VMware Player.

The VMware Player is a free virtualization software which let you run multiple operating systems simultaneously on a single PC. It can be downloaded here after a short registration. Please make sure you are downloading the latest version of the VMware Player, VMware Player 2.5.1 for Windows.

Download VMware Player

2. Install the VMware Player.

The name of the downloaded file will be VMware-player-2.5.1-126130.exe. Execute the file and install the software on your Windows machine. You will need to reboot your machine to complete the installation procedure. Once the VMware Player is installed successfully, you will be able to find the following shortcut on your desktop.

VMware Player

3. Download a pre-installed Linux image.

The next step is to get a virtual machine image to be used with the VMware Player. Fortunately, many pre-installed Linux virtual machine images are available on the Internet for free. For example, you can get a number of pre-installed virtual machine images at http://linhost.info for almost every Linux distribution. We will be using a version of Linux distribution called "Ubuntu." The latest stable version is Ubuntu 8.10. Therefore, please download the image labeled as Ubuntu 8.10 Desktop (637MB).

The desktop version is easier to use for beginners because it is based on GUI (graphical user inteface) similar to Windows. But, that's why the size of the desktop version is so huge. If you are familiar with Linux or your computer is not fast enough to display all the graphics, you can download the server version labeled as Ubuntu 8.10 Server (218MB), which is much lighter compared to the desktop version. For your convenience, we are providing the local copy of the desktop version here.

Get a Ubuntu Image

4. Decompress the downloaded Linux image.

The image downloaded from http://linhost.info is packaged with the 7-zip compression algorithm. You can decompress it using the famous alzip utility. Once decompressed, you will be able to find the following five files in the Ubuntu 8.10 Desktop directory.

Ubuntu Desktop Image

5. Boot Linux inside the virtual machine.

Well done. Now it's time to run Linux inside the virtual machine. Just click the Ubuntu 8.10 Desktop.vmx file. It will invoke the VMware Player. Actually, the file you've clicked is the configuration file which has all the information necessary to run Linux inside the virtual machine provided by the VMware Player. Note that the actual disk image is stored in the Ubuntu 8.10 Desktop.vmdx file.

Running Ubuntu

During the initialization, the VMware Player will ask you if you moved or copied the virtual machine. As indicated in the dialog box, just choose "I copied it" and press "OK" button.

Moved or Copied?

6. Logging in to Linux.

If everything goes fine, you will encounter the following fancy login screen. The default username is "user" and the password is "user". (The root password is also "user".) Log in with the default account.

Ubuntu Login Screen

The following is the screen shot you will meet after logging in. Congratulations and welcome to the wonderful world of Linux!

Ubuntu Screen

7. Shutting down Linux.

If you are done your business with Linux, you may want to shut down Linux and the VMware Player. In this case, just close the VMware Player window by clicking the [X] button in the top-right corner. The VMware Player will automatically go into the suspended mode. When you click the Ubuntu 8.10 Desktop.vmx file next time, the VMware Player will resume the previous state (Just like the suspend-resume functionality available in most Windows-based PCs and notebooks).

For more information on using Ubuntu, please refer to http://www.ubuntu.com or http://ubuntu.or.kr.

Enjoy Linuxing!