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

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 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 out something that works 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 Linux tools even if you don't run Linux on your computer.

These instructions attempt to provide just 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. Once you've connected and see the logon screen, enter s to get a shell window.

Many students in CSE 374 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 a program that supports secure 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 (select the openssh package), so you can use it for remote login to the campus machines without installing other communications programs.

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. Popular virtual machine programs include VMWare Workstation (commerical) and VirtualBox (free).

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. (Note: in recent versions of OS X, it may be sufficient to run ssh -X or ssh -Y from a terminal window. Feel free to experiment and let us know what you find.)

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 that you would have permission to copy if you were logged in to that machine directly.


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]