Adapted from material by David Chiu.
C is highly dependent on the compute environment on which it compiles and executes. This is everybody's worst nightmare: turning in an assignment you spent hours on, only to have it not compile or execute on your instructor's machine. In fact, having a common runtime environment was what made Java so successful when it was introduced in the mid-90s.
In this section, we will install Ubuntu Linux on a virtual machine so that every student will have a common environment. Important: all programming assignments should be written and submitted from this virtual machine.
Download and install Oracle VirtualBox. Note: the current version at the time of writing is version 6.0.
Download the following VirtualBox image:
Open up VirtualBox. Then click on the File > Import Appliance...
menu. Browse and
find the develop-end-ubuntu.ova
file you just downloaded, then click Continue
.
This brings up the Appliance Settings window. Important: Do not click to enable "Reinitialize the MAC address of all network cards."
Click Import
. This will take a little bit of time to finish.
Highlight develop-end-ubuntu
from the side menu, and click on Settings. From the Settings menu,
navigate to Ports. Make sure that Enable Serial Port
and is checked. IMPORTANT: Do not check Connect to Existing Pipe/Socket
. Under Path/adress:
/tmp/xinu_serial
\\.\pipe\xinu_com1
Double-click on develop-end-ubuntu
. This will start a virtual machine (VM) running Ubuntu Linux 16.06.
Think of a VM as being a program on your machine that can run a separate isolated instance of another operating system!
This VM serves several important purposes for this class and for your education:
Important for Windows Users: There is a known issue on some Windows machines that does not allow the VM to boot up or import properly. The error you receive from VirtualBox reads, "VT-X is not enabled in BIOS" or something to the effect of "virtualization is disabled". If you are experiencing this, then you need to enable virtualization in your BIOS, which is possible upon a reboot of your computer. I can help you with this, or you can Google how.
Important for newer Macs with Retina display: Some people have reported sluggishness of the virtual machine, to a point where it becomes unusable. One possible solution is to go to the App Store and download ResolutionTab. Once installed, it puts a new icon on your top menu. Select a lower resolution that is NOT HiDPI.
Once the develop-end-ubuntu
starts up, you can login with the following credentials:
xinu
xinurocks
sudo
access.You can test out a couple nice features. They've been finicky in the past though, but are huge time-savers if you get them to work.
"/tmp/VirtualBox Dropped Files"
directory.