NOTICE

The documentation on this page is for version 2014 of the CS50 Appliance.

  • You should use version 2014 of the appliance if you are:

    • taking CS50x 2015 through edX,

    • taking CSCI E-50 in Spring 2015 through Harvard Extension School,

    • pursuing a CS50 Certificate in 2015 through Harvard Division of Continuing Education, or

    • following the fall 2014 offering of CS50 on line.

    In any of the above cases, follow the instructions later on this page.

  • If following Fall 2013 of CS50 (or CSCI E-50), you should use version 19 of the appliance.

  • If following Fall 2012 of CS50 (or CSCI E-52), you should use version 17 of the appliance.

  • If following Summer 2012 of CSCI S-75, you should also use version 17 of the appliance.

  • If following Spring 2012 of CS1, CS51, or CS164, you should use version 3 of the appliance.

  • If following Fall 2011 of CS50, you should use version 2.3 of the appliance.

  • If following Fall 2010 of CS50, you should use version 2.1 of the appliance.

  • If following Fall 2009 of CS50, you should use version 1.4 of the appliance.

The CS50 Appliance is a virtual machine (VM) that lets you "take" CS50 (and other courses!), even if you’re not a student at Harvard. It’s based on Ubuntu, a Linux-based operating system. It’s an appliance in the sense that we’ve preconfigured this VM for a specific purpose: CS50!

In other words, even if you’re not a student in CS50, you can still play along at home. The CS50 Appliance will let you compile source code from lectures and implement problem sets without having to figure out how to configure clang, etc. yourself. Moreover, the CS50 Appliance lets you run Linux inside of a window on your own computer, even if you’re already running (some other version of) Linux, Mac OS, Solaris, or Windows!

Incidentally, the appliance is always work in progress, so please forgive any bugs!

In case your computer is unable to support a virtual machine, or you simply prefer not to use one, and you know how to install Linux from an ISO-9660 image, we provide an ISO image that you can use to install an Ubuntu system equivalent to the CS50 Appliance on "bare metal".

Cheatsheet

See instructions for much more detail.

Your Name

John Harvard

Your Username

jharvard

Your Password

crimson

Appliance’s IP Address

a number of the form w.x.y.z, which can be found in the appliance’s bottom-right corner

Appliance’s Version

a number of the form 2014-, (where is a minor version number) which can be found in the appliance’s bottom-right corner

Your MySQL Username

jharvard

Your MySQL Password

crimson

phpMyAdmin

http://localhost/phpmyadmin/ from within the appliance

http://*w.x.y.z*/phpmyadmin/ from your own computer (where *w.x.y.z* is the IP address in the appliance’s bottom-right corner)

Notice

For research purposes, the CS50 Appliance is designed to log:

  • command-line commands (e.g., ls, make hello, etc.);

  • the output of programs like check50, clang, gdb, style50, etc.;

  • gdb commands; and

  • source code that you create and/or save inside of the appliance. Those logs are then periodically uploaded to CS50’s servers.

Among CS50’s overarching research goals are to understand better how students code, how students respond to error messages, and how students progress from non-working to working code. None of the data that’s logged is used to compute grades.

The CS50 Appliance does not (and cannot) log any activities or files on your own Mac or PC (outside of the CS50 Appliance). It can only log activity inside of the CS50 Appliance (i.e., inside of its own window). Even so, you may disable the uploading of logs to CS50’s servers if you would like to opt out of this research. Simply run no50 in a terminal window to opt out.

Instructions

How to Install Appliance

In order to install the CS50 Appliance, you first need to install a hypervisor, which is a program that will let you run virtual machines on your own computer, whether you run Mac OS, Windows, or Linux.

  • If you have a Mac, you can check which version of OS X it’s running by selecting About this Mac from the Apple-logo menu at the top-left corner of your screen. If your version of OS X is 10.8.x ("Mountain Lion") or later, we recommend that you follow these instructions for VMware Fusion 7. [1]

  • If you have a PC running a 64-bit edition of Windows or Linux, we recommend that you follow these instructions for VMware Workstation 11. [2]

Alternatively (if your computer doesn’t meet the requirements above, or you run into trouble with the applications donated by VMware), you might follow these instructions for VirtualBox.

Once the appliance installed, it’s not uncommon for it to take a minute or so to boot. But if, once at John Harvard’s desktop, the appliance still feels unbearably slow on a PC running Windows or Linux, you might need to enable hardware virtualization. (Hardware virtualization should be enabled by default on any Intel-based Mac manufactured in the past few years.) Even with hardware virtualization enabled, though, virtual machines might still feel slow if your computer is a few years old, has a CPU that’s running at less than 2GHz, or has only 1GB or so of RAM.

How to Update Appliance

To determine which version of the appliance you have, simply look in the appliance’s bottom-right corner, where you should see 2014- in boldface, where is a number. Alternatively, you can open a terminal and execute

appliance50 -v

which should report 2014-# as well.

To ensure you have the latest version of the appliance, you can update yours by opening a terminal and executing:

update50

An update may take several minutes.

Note that you cannot update from version 1.4, 2.1, 2.3, 3, 17a, 17, or 19 of the appliance to version 2014. You must instead download 2014, per the instructions above.

How to Use Appliance

The first thing you should see when the appliance boots up is John Harvard’s desktop. (Oh, henceforth, you are John Harvard. Your initial password is crimson. And here’s what you look like.) Even though you might think of Linux as having only a command-line interface, graphical user interfaces do exist. We’ve installed Xfce, one of the most popular, for you. However, we installed as few programs as possible to keep the appliance small. You’re welcome to install additional programs via apt-get.

How to Change Password

You can change your password in any of these ways:

  • Select Menu > Settings Manager > Users and Groups and follow the on-screen prompts.

  • Open a terminal and execute:

    passwd

With that said, allow us to suggest that you not change John Harvard’s password if your own computer is already password-protected. (Life will be simpler with crimson.) The appliance has been configured in such a way that only someone with access to your computer (e.g., you) can access the appliance. Even though the appliance can connect to the Internet, the Internet cannot connect to the appliance.

How to Open a Terminal

You can open a terminal in any of these ways:

  • Select Menu > Accessories > Terminal Emulator. You’ll find yourself in your home directory (~).

  • Click Terminal’s icon (a black square) in the appliance’s bottom-left corner. You’ll find yourself in your home directory (~).

  • Right-click anywhere on your desktop and select Open Terminal Here. You’ll find yourself in ~/Desktop/.

  • Select Menu > Accessories > gedit. You’ll find yourself in your home directory (~) in gedit’s bottom panel.

No matter the approach you take, it’s in the terminal window that you’ll be able to type commands like cd, clang, ls, etc.

How to SSH to Appliance

If you’d like to SSH to the appliance from your own computer (as with Terminal on Mac OS or with PuTTY on Windows), you can SSH from your computer to the appliance’s IP address (which is displayed in the appliance’s bottom-right corner).

How to Change Resolution

You can change the appliance’s resolution (i.e., width and height) in either of these ways:

  • Select Menu > Settings Manager > Display within the appliance, select a new value to the right of Resolution, then click Close.

  • Click and drag the appliance’s bottom-right corner.

How to Enable Dropbox

This feature requires Internet access.

To make it easier to back up files within the appliance automatically as well as share them with your own computer(s), you can synchronize a directory in John Harvard’s account with Dropbox.

Here’s how to configure the appliance for Dropbox.

  1. Select Menu > Dropbox.

  2. You should be prompted to "download the proprietary daemon" (i.e., software); click OK. The software should proceed to download and unpack.

  3. You should then be prompted to set up Dropbox.

    • If you don’t already have a Dropbox account, leave I don’t have a Dropbox account checked, then click Next. Create your Dropbox as prompted.

    • If you already have an Dropbox account, check I already have a Dropbox account, then click OK. Log in as prompted.

  4. If prompted to upgrade your Dropbox, simply leave 2 GB checked (which is free) then click Next, unless you want to upgrade to a paid account.

  5. If prompted to Choose setup type, leave Typical checked, then click Install. If prompted to "merge", click Merge.

  6. If prompted to take a 5-step tour, click Skip Tour; its screenshots won’t match what you’ll see in the appliance.

  7. When informed That’s it!, uncheck Open my Dropbox folder now, then click Finish. A Dropbox icon should then appear in the appliance’s bottom-right corner.

Only those files and folders that you save in ~/Dropbox/ will be synchronized with your Dropbox account.

How to Prevent Dropbox from Synching Personal Files into the Appliance
  1. Ctrl-click on the Dropbox icon in the appliance’s bottom-right corner and select Preferences….

  2. Click Advanced.

  3. Click Selective Sync….

  4. Uncheck the folders that you don’t want synched into the appliance.

  5. Click Update.

How to Transfer Files between Appliance and Your Computer

If you’d like to SFTP to the appliance from your own computer (as with Cyberduck on Mac OS or with WinSCP on Windows), you can SFTP from your computer to w.x.y.z (where w.x.y.z is the appliance’s IP address, which can be found in the appliance’s bottom-right corner).

Alternatively, you can "mount" John Harvard’s home directory (via a protocol called SMB, otherwise known as CIFS) in a window on your own desktop, to and from which you can drag and drop files. Here’s how, whether you run Linux, Mac OS, or Windows.

Windows
  1. Open any folder on your hard drive.

  2. Click the address bar atop the folder’s window and input \\w.x.y.z\jharvard (where w.x.y.z is the appliance’s IP address, which can be found in the appliance’s bottom-right corner), then click Enter.

  3. If prompted for your name and password:

    1. Input jharvard for User name.

    2. Input crimson for Password.

    3. Check Remember my credentials if you’d like.

    4. Click Connect.

John Harvard’s home directory should then open in a new window.

Mac OS
  1. Select Connect to Server… from the Finder’s Go menu.

  2. Under Server Address:, input smb://w.x.y.z (where w.x.y.z is the appliance’s IP address, which can be found in the appliance’s bottom-right corner). (Click the + icon if you’d like to add the appliance to your Favorite Servers.) Then click Connect.

  3. If prompted for your name and password:

    1. Select Registered User.

    2. Input jharvard for Name.

    3. Input crimson for Password.

    4. Click Connect.

John Harvard’s home directory should then open in a new window.

How to Take a Screenshot

It’s sometimes helpful to take a screenshot of the appliance so that you can remember or share something you see on your screen.

To take a screenshot inside of the appliance:

  1. Select Menu > Accessories > Screenshot.

  2. Check a Region to capture.

  3. Leave Capture the mouse pointer checked unless you’d like to hide it.

  4. Leave Delay before capturing at 1, unless you need more time.

  5. Click OK.

  6. You should then be prompted to decide on an Action. Leave Save checked and then click OK if you’d like to save the screenshot as a file; decide on a destination as prompted. You can then share that screenshot with someone if necessary, as by opening Gmail in Firefox and sending it as an attachment.

You can also share control of your screen if you need someone else to see more than a screenshot.

How to Share Control of Your Screen

This feature requires Internet access.

So that you can help (and be helped by!) fellow learners on the Internet, the appliance comes with TeamViewer, which lets you share (control of) your screen with someone else (a "partner") on the Internet (and vice versa).

To share your screen with some else:

  1. Select Menu > TeamViewer. (Click Accept if prompted.) A window should appear.

  2. Tell your partner Your ID and Password that you see. Once your partner inputs those values, your screen should be shared. Though if your own computer has a firewall, you might first be prompted to "allow incoming connections" or the like.

To see someone else’s screen:

  1. Ask your partner for a Partner ID and Password.

  2. Select Menu > TeamViewer. (Click Accept License Agreement if prompted.) A window should appear.

  3. Input the Partner ID into that window, then click Connect to partner.

  4. When prompted, input the Password, at which point you should see your partner’s screen.

If you would like to connect to someone else’s appliance from your own computer (rather than from your own appliance) or from a mobile device, you can download TeamViewer for free for Android, iOS, Linux, Mac OS, or Windows from http://www.teamviewer.com/en/download/.

Changelog

  • 1.4

  • 2.0

  • 2.1

  • 2.2

  • 2.3

  • 3

  • 19

  • 2014-0

    • Transitioned to Ubuntu

  • 2014-24

  • 2014-26

  • 2014-29

Known Issues

None at this time.

Future Work

Below are features that may be included in some future version of the appliance.

  • Add Selenium.

  • Add dnsmasq and resolve *.localdomain to 127.0.0.1.

  • Add support for static IPs.

Acknowledgements

Many thanks to everyone who’s helped us improve the CS50 Appliance, including, but not limited to:

  • Aaron Oehlschlaeger

  • Amir

  • Cheng Gong

  • Chris Gerber

  • Dan Armendariz

  • Darrin Ragsdale

  • Dotty

  • Federico Lerner

  • Gabriel Guimaraes

  • Glenn Holloway

  • James Lankford

  • Kartikeya Srivastava

  • Matthew Polega

  • Matthew Roknich

  • Mauro Braunstein

  • Nobu Kikuchi

  • Philip Durbin

  • R.J. Aquino

  • Rob Bowden

  • Rod Ruggiero

  • Rolando Cruz

  • Rory O’Reilly

  • Sergio Prado

  • Shaun Gibson


1. If you’re using OS X version 10.7.x ("Lion"), please drop a note to sysadmins@cs50.harvard.edu.
2. If your Windows or Linux computer runs a 32-bit OS, please drop a note to sysadmins@cs50.harvard.edu.