CSE logo University of Washington Computer Science & Engineering
 CSE 374 Programming Concepts and Tools - Getting Started with Linux - Spring 2009
  CSE Home   About Us    Search    Contact Info 

CSE 374 is a new course this quarter and the details of setting up usable computing environments for everyone are something that we may have to learn a bit as we go. This document gives some basic information about getting started with Linux. Please let us know what we need to change or add as you discover what works, what doesn't, and (even better) what could be improved.

The good news is that there are many, many ways to get access to a usable Linux system on your own computer or on machines owned by UW. The bad news is that there are many, many ways to get access to a usable Linux system on your own computer or on machines owned by UW. The downside here is that you may run into problems that are due to your individual setup and it may be hard for us to diagnose exactly what is going on, particularly if it involves a remote connection from home. But we should be able to figure something out for everyone.

The bottom line is actually pretty simple. You need to be able to open a window that runs bash, the standard Linux shell, and has editors, compilers, and other tools that allow you to create and run shell scripts and C/C++ programs. Almost any relatively recent Linux distribution will be fine, and there are easy ways to set up your personal machine to run bash and the Linux tools even if you don't run Linux on your computer.

These instructions just attempt to provide enough information to get a basic environment running. Feel free to use fancier multi-window systems, virtual machines, dual-boot setups, or whatever you'd like.

Access to Campus Linux Machines

All students have accounts on the central UW machine dante.u.washington.edu. This machine is running Red Hat Linux and you can connect to it using the UW internet kit (UWICK, available at the bookstore or downloaded from the UW computing web site). Once you've connected and see the logon screen, enter s to get a shell window. You can also connect to dante with any other software that provides a secure shell (ssh) command or connection.

Most of the students in CSE 374 this quarter are EE majors. The EE department maintains a collection of Linux workstations known as linux01.ee.washington.edu through linux17.ee.washington.edu. Several of these are in the EE computing lab and all can be accessed remotely via a ssh login if you have an EE account.

Depending on your setup, you may be able to run X-windows remotely on the EE and some other machines (but not dante). That gives you the ability to open multiple windows and other conveniences, but is not necessary for this class.

Getting a Linux Shell on Windows

It is entirely possible to do all of your work by logging in remotely once you've set up the UWICK or some other program that supports ssh login sessions. But it is also convenient to be able to work directly on your own machine, and there are several ways to do it.

The cygwin package (http://www.cygwin.com/) installs on Windows and provides bash, gcc, and all of the other tools we need. You will have to explicitly select some packages in the installer, since not everything we use is part of a default installation, but if you later discover you need something you didn't include before you can rerun the installer and add it. Cygwin also includes ssh (the openssh package), so you can use it for remote login to the campus machines, without installing the UWICK.

If you want to run a full Linux distribution, you can always set up your computer as a dual-boot machine, where you can select Linux or Windows each time you restart. This requires a bit more adventurousness on your part, but is entirely possible. Popular distributions include Ubuntu (http://www.ubuntu.com/) and Redhat Fedora (http://fedoraproject.org/). One warning: the distributions are quite large and you won't want to download them unless you have a fast internet connection or a lot of patience.

Finally, you can install a Linux distribution in a virtual machine and run it alongside your Windows programs, almost like another application. If you are interested in this, particularly if you'd like to provide instructions to share with the rest of the class, please talk to the instructor.

Getting a Linux Shell on a Mac

Install the optional Xcode development tools that came with your Mac, or can be downloaded from http://developer.apple.com/mac/ (free signup required). You're all set. Mac OS X is a Unix system underneath, and while it's technically somewhat different from Linux, it uses the same tools for software development. Open the Mac terminal application to get a shell window. You can also use ssh from there to access campus Linux machines.

If you want to run X windows on your Mac for remote access, you need to install the optional X11 package. Then run X11's xterm program instead of the regular OS X terminal and open remote X connections with that.

Copying Files Across the Network

You may find that you want to move files from one machine (say at home) to another (say in the lab). While you can mail the files as attachements or use other schemes, a more direct way is to use the scp command. This command uses the same remote login authentication as ssh, and allows you to copy any files to or from the remote machine if you would have permission to do the same copy operation locally once you're logged on.


CSE logo Computer Science & Engineering
University of Washington
Box 352350
Seattle, WA  98195-2350
(206) 543-1695 voice, (206) 543-2969 FAX
[comments to Hal Perkins]