System Setup
This page will help you do the following things:
- Access a terminal
- ssh to the Halligan homework server
- Use basic Unix commands (cp, ls, etc.)
- Setup VSCode and the SFTP extension
Working Remotely
Remote access to the server will allow you to, create, edit, and remove files on the Halligan homework server from your local system. It will also allow you to compile and run your work in a course-approved environment. The following steps should be familiar to those of you who have taken CS 11 here at Tufts, but please don't hesitate to ask for help with any of them.
Step 1: Terminal Access
In order to work remotely on your own computer, you'll need a program that lets you interact with the department server. To do this, you first need access to a command-line interface.
- For Windows:
- Download MobaXterm
- You may want to go to Settings/Configuration -> terminal tab, and uncheck “Backspace sends ^H”
- Download MobaXterm
- For Mac:
- Use the native Terminal application.
-
You many want to enable developer tools. Open the Terminal,
and type:
DevToolsSecurity -enable
- For GUI applications, we suggest XQuartz.
-
You many want to enable developer tools. Open the Terminal,
and type:
- Use the native Terminal application.
- For GNU/Linux:
- Use the native terminal application.
Step 2: SSH
After you have access to a terminal, you'll use ssh (Secure SHell)
to connect to the Halligan homework server. The ssh
command
establishes a connection between your local machine and (in this case) the
homework server, which allows you to run commands on (your personal folder
in) the homework server from your machine.
ssh username@homework.cs.tufts.edu
username
is your CS department user name.
Note: If you want to open up a GUI (graphical user-interface) running emacs or kate, then you'll need to tell the server that it can open windows on your machine. This is almost the same as above:
ssh -X username@homework.cs.tufts.edu
-X
tells homework it can use X-Windows, to
communicate with your computer.
SCP
It's often useful to know how to copy files between your local system and the homework server. SCP (secure copy protocol) is a tool for just this purpose. The syntax is as follows:
scp username@homework.cs.tufts.edu:/server-file-path/ local-file-path
So, if you ever need to copy a file from your home directory on the server to the current directory on your local machine, you can do:
scp username@homework.cs.tufts.edu:~/filename .
And, if you ever need to copy a file from your local machine to the server, you can do:
scp local_file_path/filename username@homework.cs.tufts.edu:~/
Also, use the -r option to copy any directories (recursive mode).
Unix Reference
You will probably notice that the command-line interface is quite different
from the graphical-user interfaces we commonly use today (no mouse!) Because
you will be spending quite a bit of time in this kind of environment,
it's a good idea to be familiar with basic Unix commands
(Linux is kind of Unix operating system).
You will need to create directories, navigate among directories, create,
copy and remove files, compile files, etc.
One good reference is:
http://www.ee.surrey.ac.uk/Teaching/Unix/
.
VS Code and SFTP
You will need a text editor installed in order to edit your code! While there are many available options (emacs, vim, VSCode, Sublime, etc.), we are officially supporting VS Code with the SFTP extension.
Use our VSCode and SFTP guide to get set up.