If you wish to use your own existing Linux-based desktop or laptop instead of the class virtual machine, the labs might just work, but note that we won't be able to help you debug any problems you might have.
For a basic virtual machine setup, perform the following four steps:
For more advanced tune-ups to help your productivity, do the following:
Launch class VM image and log in.
Under the "Devices" menu, click "Insert Guest Additions CD".
Start LXterminal, type cd /media/lab/VBox_GAs_5.2.24/. Become root by typing sudo bash. Afterwards, type ./VBoxLinuxAdditions.run. Restart Virtual box and re-launch class VM. Now you should be able to do copy-n-paste between native OS and class VM.
To mount a native folder in class VM, inside VirtualBox, click "Settings" button, and then click "Shared Folders" on the left. Click the add-share logo on the right hand side. Enter the "Folder path" in your native OS (e.g. /User/jinyang/golabs and "Folder name" (e.g. golabs) with "Auto-mount" selected.
Launch class VM, open LXterminal once logged in. Create mount directory by typing sudo mkdir /mnt/golabs. Mount by typing sudo mount -t vboxsf -o uid=1000,gid=1000 golabs /mnt/golabs. From now on, the /mnt/golabs directory refers to the /User/jinyang/golabs directory in your native OS. If you reboot the VM, you will lose your mount. To keep it automatically mounted across reboots, add the following line (as root user) to your class VM's /etc/fstab file by typing:
sudo bash -c 'echo "golabs /mnt/golabs vboxsf uid=1000,gid=1000 0 0" >> /etc/fstab'
Virtualbox wants you to enable virtualization in BIOS. If you don't know how to do that, come to see one of the course staff.
You should try to allocate more video memory to your VM. Shutdown your VM first. Then open "Settings", click "Display", and change "Video Memory" to a larger value.
If on your VM desktop, there is an icon that appears like a CD, that means you inserted the CD image already. You cannot insert the CD image twice.
When you add a shared folder in VM settings, you will specify a folder name. If you folder name is abcdefg, then when you mount your shared folder inside VM, you should change the command to sudo mount -t vboxsf -o uid=1000,gid=1000 abcdefg /mnt/golabs
That is a security feature. Terminal won't display your typed password because someone sitting next to you can see it and steal your password. Just continue to type your full password, and hit Enter
After you install the Guest Additions CD Image, in the VirtualBox Menu bar, click "View" then "Full-Screen Mode", then wait for a while. The first time switching to full screen requires patience. If it still does not work, uncheck "Full-Screen Mode" and then check "Full-Screen Mode", and wait for a while. Repeat until you run out of patience and decide to give up and use "Scaled Mode" instead...
This is just a warning, you can ignore it. But if you really wants to get rid of the warning message, open up a terminal, type sudo sh -c 'echo "127.0.1.1\tvbox" >> /etc/hosts'
Log into the class virtual machine and start a terminal by clicking the "LXterminal" icon on the desktop (alternatively, use the short-cut key combination "Ctrl-Alt-t").
Install golang1.13 by downloading this binary package and follow the instructions given here. Make sure you install the latest version 1.13 of Golang. It's been reported that some earlier version of Golang does not work with the labs.
You may skip using VirtualBox and directly install Go1.13 on your MacOS. However, we will not provide any technical support should you encounter any OS-related issues in doing the labs. Furthermore, should the results of your lab differ from what we have obtained by running the tests on Linux, we will use our test results in determining the grade.
In a VirtualBox terminal, clone your repo by typing the following:
$ git clone https://github.com/nyu-ds-fa19/golabs-<YourGithubUsername>.git golabs $ cd golabsYou will see that a directory named golabs has been created under your home directory. This is the git repo for your lab assignments throughout the semester.
$ git commit -am "saving my changes" $ git push originNote that whenever you add a new file, you need to manually tell git to ``track it''. Otherwise, the file will not be committed by git commit. Make git track a new file by typing:
$ git add <my-new-file>After you've pushed your changes with git push, they are safely stored on github.com. Even if your laptop catches on fire in the future, those pushed changes can still be retrieved. However, you must remember that git commit by itself does not save your changes on github.com (it only saves your changes locally). So, don't forget to type that git push origin.
To see if your local repo is up-to-date with your origin repo on github.com and vice versa, type
$ git status
$ git commit -am "saving all my changes and handing in" $ git push originWe will fetching your lab files from Github.com at the specified deadline and grade them.