|
Lab Outline: In this first lab you should learn about logging into the department's teaching server, using the putty client, and how to compile from the command line under Unix. The intention of the tutorial is to introduce students with no Unix experience to the Unix command line. If you are a Unix wizard, this tutorial won't teach you anything new. Understanding the basics of how to use Unix is important for this course because (1) a lot of networking is based on Unix machines, and (2) I will evaluate the assessed coursework on a Unix machine, so it would be good for you to test under Unix as well (you can develop however you want). Note that Windows commands do not work under Unix. The Teaching Linux Server: The department has a machine that you can use for doing your networking exercises on. You don't have to, but I will evaluate your coursework on that machine. The name of the machine is unix.tn.informatics.scitech.susx.ac.uk There's JavaC in the latest JDK and also GHC (on the Programming menu) installed. You can develop your applications there, or anywhere else, using whatever programming environment you feel comfortable with. From a Unix/OS X command line, you can log into that machine as follows. slogin -X your_login@unix.tn.informatics.scitech.susx.ac.uk To transfer data to/from that machine you can use scp filename your_login@unix.tn.informatics.scitech.susx.ac.uk: copies a file called "filename" to your root directory on the teaching server. To go the other way, you use: scp your_login@unix.tn.informatics.scitech.susx.ac.uk:filename . To do the same under Windows you have two choices. The PuTTY Client: Since commands like scp, and slogin do not come natively with Windows, you need to install a little helper application called PuTTY. It is installed on the PCs in the labs. You can also download the PuTTY client here. The documentation is here. When you start PuTTY, a window like the following pops up: Put "unix.tn.informatics.scitech.susx.ac.uk" in the field "Host Name" and press open. This will connect you to the unix server. You will then be prompted for your user ID and password. If you supply these, you will gain access to your home directory under Unix. You will find a directory "WindowsProfile" there contains a link to your local windows desktop and all the files it contains. Mounted Unix Partition. The department has automatically mounted your Unix files as a directory reachable from your desktop. Compiling and Running Java Under Unix: To compile a Java file named IPFinder.java, simply execute javac IPFinder.java This will produce a file called IPFinder.class which can be executed as follows: java IPFinder Write a little "Hello World!" type of java program and try to run it on the server. |