100 likes | 115 Views
Get started with Linux servers, log in, transfer files, and work seamlessly between operating systems. Learn Java programming, debugging tips, and code submission methods for CSE 326 course. Utilize text editors like Emacs, Vim, and Pico efficiently.
E N D
CSE 326:Your Computing Environment Steve Martin Aiman Erbad
Starting out. . . • How to log in to a Linux server • Available servers: • Tahiti • Fiji • Ceylon • Sumatra • Use the easy shortcuts: • Start : Programs : Internet and Remote Connections : SSH : X Connections
Basic Linux Etiquette • Once you log in, you are placed in your home directory. • A good, easy guide to Linux: http://www.cs.washington.edu/orgs/acm/tutorials/intro-unix/unix-basics.ppt
Moving Files Between OSes • SFTP • Start : Programs : Internet and Remote Connections : SSH : SFTP Connections • Samba • Can easily map your home directory to a Win32 network drive! • Very useful if you want to work with a Win32 java editor! • Start : Run, then \\tahiti.cs.washington.edu (example) • Click on the directory named with your login. This is your home directory. • To make a network drive, copy the address, right-click on ‘My Computer’, and select ‘Map Network Drive.’
CSE 326 Java Programming • You can do all of your code work in either OS. • All lab machines have Java2 1.4.1 on them, as do the Linux servers. • However, GRADING WILL BE DONE IN LINUX. • Map your home directory to a drive, work in Windows, and test in Linux. • Some good Windows editors. . . • jEdit • Blue Jay • Xemacs for Win32 • EditPlus • . . .Notepad. . .
CSE 326 Java Programming II • Note that there is no really good debugger (that we know of) for Java apps. • Time to break out the system.out.println mojo. • Write clear code and document it well with comments, and you’ll be fine. • Turnins are done in Linux with the turnin command • More on this later.
Working with code/text in Linux • . . .We use a text editor. Some of the possibilities are: • Emacs • Most popular • Many features • Easy to learn • Available for many, many OSes • Vim • Also powerful • A bit harder to learn. . . • Pico • Very simple, barebones editor
An Introduction to Emacs • To start up: • [stevaroo@tahiti]$ emacs & • [stevaroo@tahiti]$ emacs <filename> & • Some basic commands: • [CNTRL]-x s = SAVE • [CNTRL]-x f = OPEN FILE • [CNTRL]-x c = QUIT • [CNTRL]-s = SEARCH • [CNTRL]-k = CUT • [CNTRL]-y = PASTE • [CNTRL]-a/d = GOTO beginning/end of line • [CNTRL]-g = EXIT COMMAND BUFFER (at bottom)
More Emacs. . . • How to turn on syntax highlighting (2 ways) • Create a .emacs file in your home directory with the following line: • (global-font-lock-mode) • In emacs: • Hit ‘ESC’ then ‘x’. Type ‘global-font-lock-mode’ • How to split your window: • [CNTRL]-x 2 = Split Horizontally • [CNTRL]-x 3 = Split Vertically • [CNTRL]-x 1 = Go back into 1 window
Turning Stuff In • We use the turnin command from the command line. turnin: usage [-hlsvV] [-c course[=section]] [-p project] [files] c course specify the course to use h print this help message i output shell commands to set user's environment l list projects active for the selected course p project specify the project to submit to s list courses the envoker is enrolled in v be verbose (also passed to tar) V show version information files list of files to submit