If you are a Linux/Unix expert and would prefer to use a commandline user interface to run/use Linux, may be Vagrant is for you! (On the other hand, if you would prefer to have a "desktop" user interface, then Vagrant would be wrong for you.)

Even with a commandline user interface, you can run applications with graphical user interfaces. But this would require you to run an X11 Window System. Therefore, before you install and run Vagrant, you need to first install X11 on your machine.

All examples below will assume that you have a 64-bit machine since it's more common these days. Although inside a virtual machine, we will run a 32-bit Linux system (Ubuntu 16.04) since our assignments will be graded on a 32-bit Ubuntu 16.04 system.

The first step is to install X11 on Windows. My recommendation is to install Cygwin, which is a Unix-like system that can be configured to run with an X11 server. Please follow these steps to install Cygwin before proceeding.

Here are the quick and dirty steps to install Vagrant with VirtualBox:

  1. Follow these instructions to download and install VirtualBox and Vagrant. If your machine is a 64-bit machine, download and install the 64-bit version of these software.
  2. Run a Cygwin Terminal and type the following into the Cygwin Terminal (lines that start with "#" are instructions and not commands):
        mkdir ~/Vagrant
        mkdir ~/Vagrant/sitepoint
        mkdir ~/Vagrant/shared-ubuntu-vagrant
        pushd ~/Vagrant/sitepoint
        vagrant init
        rm Vagrantfile
        vagrant init ubuntu/trusty32
        nano Vagrantfile
        # nano is a text editor (you can also use "vi" if you are familiar with it), do the following in nano:
        # Uncomment and change:
        #     config.vm.synced_folder "../data", "/vagrant_data"
        # to:
        #     config.vm.synced_folder "../shared-ubuntu-vagrant", "/outside"
        vagrant up
        popd
  3. Now you have a barebone Ubuntu 16.04 running inside VirtualBox. We will refer to this Ubuntu 16.04 running inside VirtualBox as "VagrantBox". To further setup your VagrantBox, you need to ssh into it by typing the following into the Cygwin Terminal:
        ssh -X -Y vagrant@127.0.0.1 -p2222
    Use "vagrant" as your user name and "vagrant" as your password whenever you are prompted for a password when are you dealing with the VagrantBox. The above command is the command you must use to ssh into your VagrantBox (from a Cygwin Terminal).

    When you are inside your VagrantBox, if you want to use tcsh instead of bash, you should install tcsh by typing:

            sudo apt-get install -y tcsh
    To change your default login shell to tcsh, do:
            chsh
    Enter /bin/tcsh as your new shell.
  4. Run the following commands to install more software since this is a barebone system:
        sudo apt-get install -y gdb
        sudo apt-get install -y genisoimage
        sudo apt-get install -y gnome-terminal
        sudo apt-get install -y Xorg
  5. Follow the instruction to install all the necessary software to do your kernel assignments.
  6. Type "exit" to disconnect from your VagrantBox.
  7. You are all setup now! Here is the summary of 3 important commands to use your VagrantBox:
    To turn off the VagrantBox, type the following into a Cygwin Terminal:
            pushd ~/Vagrant/sitepoint; vagrant halt; popd
    The above command is the command you must use to shutdown your VagrantBox (from a Cygwin Terminal).

    To turn on your VagrantBox (from a Cygwin Terminal), do:

            pushd ~/Vagrant/sitepoint; vagrant up; popd
    To ssh to your VagrantBox (from a Cygwin Terminal), do:
            ssh -X -Y vagrant@127.0.0.1 -p2222
To exchange files between your VagrantBox and your Cygwin system, a shared folder is used. Based on the above setup, inside your VagrantBox, "/outside" is the shared folder; inside your Cygwin system, "mkdir ~/Vagrant/shared-ubuntu-vagrant" is the same shared folder. This way, if you want to backup some code you wrote for your programming assignments into your cloud drive, you can just copy your data into the VagrantBox shared folder and add the Cygwin shared folder to your favorite cloud drive.
 
Mac Os X is running Unix, but it's not running X11. Therefore, you need to first install X11. Download and install XQuartz, which includes X11 server and client software. After it's installed, run XQuartz.app from the Utilities folder in Applications. You should get a window with "xterm" in the titlebar. This is your "terminal" window running a Unix "shell".

The rest of the procedure is the same as for Windows! The only difference is that instead of using a Cygwin Terminal, you will be using a "terminal/xterm".