Storing stuff on your VM's filesystem is nice in some ways - you can work regardless of whether or not you have network access, for example. On the other hand, it's got some serious negatives. If your laptop dies you lose all your work. If the file on your laptop that contains the VM's state gets corrupted, you lose all your work. Finally, the work you do in the lab is not available on your VM and vice versa, undless you go back to constantly copying files back and forth. So ...
... storing stuff in your CS Department home directory is the best option. It's backed up nightly, accessible from the computer lab and, thanks to the "csunixmount" script that's preloaded on your VMs, it's accessible from your VM - as long as you have a network connection.
csunixmountscript and keep everything in your CS Department home directory.
1. in your VM home directory, give ls command. Note the directory "csunix". Give command cd csunix, then ls. Note: it's empty. give cd .. to go back to your home directory 2. run csunixmount cd to csunix again and do an ls. Now there's a file README. Give command cat README NOTE: you instructor will explain what's happened and why and recall: cd, ls and cat 3. give command cd ~ (takes you back to your VM home directory) give command csunixunmont do ls csunix (now it's empty again) do csunixmount (files are back!)
1. cd to csunix home directory 2. open README with emacs, change text to "This is my CS Department home directory." close. cat again and see what you've got. 3. do 'emacs hello.cpp' and create the hello world program (as shown on right) Save it! 4. compile (g++ -o hello hello.cpp) and run (./hello) NOTE: the files are on CSDept fileserver, but the program runs in your VM! 5. run codeprint and drag resulting file out.pdf over to Windows desktop (good for printing)
1. Give commands: cd ~ cp csunix/hello.* . ./hello Note: now the files are both on your VM and in your CSDept home directory 2. Use cd and ls to verify they're also in your CSDept home directory 3. Make sure you're in your CSDept home directory and give command rm hello.* 4. verify hello.cpp and hello are still in your homedirectory on your VM
Ssh is not the recommended approach for this course, but it is an important tool that you'll see over and over during the course of your time here.