Link Search Menu Expand Document

Instructional machine setup (VM alternative)

Table of contents

  1. Editing code on the instructional machines

If you prefer not to use the VM as a development enironment, or you are unable to set up the VM for local development, you can use the EECS Instructional Computers instead.

Note: This setup is experimental, and primarily applies to students planning to use the new Apple M1 Macs. If you plan on using this setup, please notify course staff (i.e. via private Piazza post) so that we can keep you updated regarding any infrastructure developments.

To use the EECS Instructional Computers, you should first acquire a UNIX account from EECS Instructional WebAcct, then use that account to login to a suitable EECS Instructional Computer (ashby, derby, cedar). The first time you login, you should run the CS 162 setup script, which loads the development repositories and utilities. You can then use the instructional machine as your development environment, similar to the VM, though some features may still be unavailable.

ssh cs162-xxx@ashby.cs.berkeley.edu
. /home/ff/cs162/public/setup

You should still follow the steps in “Virtual Machine Configuration” to set up Git, SSH, and your repositories.

Editing code on the instructional machines

To make it easier to ssh onto your account, first update your password:

ssh cs162-xxx@update.cs.berkeley.edu

To remotely modify code, you will need to ssh onto the machines. Visual Studio Code has a helpful remote development feature that streamlines the process of developing over ssh. To set this up, follow the steps below:

  1. Download and open Visual Studio Code.

  2. Open the Extensions tab on the left and search for “Remote - SSH”. Download the first result, which should have several million downloads. remote_ssh_extension

  3. Hit Cmd + Shift + P and type in “Remote-SSH: Connect to Host”, selecting the corresponding command. remote_ssh_command

  4. To make things easier in the future, select “Add New SSH Host”, put in ssh cs162-xxx@ashby.cs.berkeley.edu.

  5. On the next step, select the first option (which should be of the form ~/.ssh/config) as the SSH configuration to update.

  6. You may repeat steps 2-5 for 1-2 different hive machines since individual machines may be down at different times.

  7. Hit Cmd + Shift + P again and select “Remote-SSH: Connect to Host”. The hosts you set up earlier should now show up, so select the one you would like to connect to.

  8. A new window should open up with a bright “Opening Remote” indicator in the bottom left. You will need to enter your password in the textbox that pops up at the top of the screen.

  9. If your remote login was successful, you should now see “SSH: ashby.cs.berkeley.edu” in the bottom left corner.To edit your files, click on the Explorer tab at the top left of the window, then select “Open Folder”. Select “OK” to select your home folder (you can select other folders if you would like as well), then enter your password again. remote_ssh_open_folder

  10. You should now be able to edit any file you would like and have it sync with your remote machine! To disconnect, click on the “SSH: ashby.cs.berkeley.edu” label at the bottom right of the window, which should open up a panel of options including “Close Remote Connection”.