Using x86-64 Linux in CSE 410

This course explores low-level topics in machine representation of programs and data. For our reference system we're using Fedora Linux. Other Linux and Mac OS X systems are very similar, and Windows machines also use the same underlying processors and memory organization. But for projects in this course, the department's Fedora Linux is currently our reference system and assignments need to work on, and will be graded on, those systems. If you normally run a different 64-bit Linux distribution on your computer you may be able to use that as you work on your assignments, but you need to check your answers on the CSE department machines to be sure there are no subtle differences that cause problems when we evaluate your work.

These notes are a work in progress. Comments, questions, and suggestions on the class discussion board or via email to the staff would be most appreciated.

CSE x86-64 Linux VM

If your hardware supports it, the "home virtual machine" will allow you to run 64-bit Linux on your own computer. See the links on the navigation bar on the main course web page to find the details. Briefly, you'll need to install either VMWare player (free for Windows machines) or VMWare Fusion (about $50 at the University Bookstore for Mac OS X). Then you download a big, 8GB or so, set of files from the CSE web site, start it up using VMWare, and go through the configuration steps needed to set up an account with your desired user name. After you do this, be sure to run Fedora's software update program to install all available patches and security updates. This can amount to several hundred MB the first time you do it, so you may want to wait until you have access to a fast network connection.

klaatu.cs.washington.edu

Everyone in the class has an account on this machine, which is basically the same Fedora Linux image as the home VM. Your account name is your UW netid and the password is randomly generated; you will receive an email message from the course staff with this initial password. Even if you run the VM on your own machine for most of your work, you should log in to this machine to verify your account is set up properly. At least one of the assignments this quarter will involve unique starter code files for each student and we'll distribute those by placing them in your home directory on klaatu.

Remote access to klaatu from other Linux or OS X boxes

If you have a command-line (terminal) interface on your system, you can use ssh to log in:

ssh [your uwnetid]@klaatu.cs.washington.edu

You'll need to enter your password to log on. If this is the first time you've accessed klaatu you'll receive a warning that it is a previously unknown system name. Answer yes or ok or whatever is needed to accept the connection.

We suggest you use the passwd command on klaatu to change your password after you've logged in the first time.

You can use the scp command to transfer files between klaatu and your local machine. Usually this is easiest to do by issuing the commands on your machine since klaatu has a well-known internet address, while your machine may have a different dynamic address each time you use it.

Remote access to klaatu from Windows

There are many graphical and command-line applications for Windows that can be used for ssh logins and scp file transfers. Feel free to use whatever you want, but we recommend Putty for remote logins and WinSCP for file transfers.

These programs are pretty intuitive to use. Rather than typing a command line, you need to fill in fields in dialog boxes to specify the machine name (klaatu.cs....), your userid, and password. WinSCP has a particularly convenient dual-pane window view that makes it easy to drag files between your local machine and the remote one. Once you log in we suggest using the passwd command on klaatu to change your password.

If you want to do some source code editing on Windows without being connected to klaatu, a good, basic text editor that provides syntax highlighting and other features for C and dozens of other languages is notepad++ (http://notepad-plus-plus.org/).

Basic Linux Commands

CSE 410 projects are designed not to require much knowledge of Linux, beyond simple file system commands and those needed to compile and debug C programs (gcc and gdb primarily). A short tutorial written for CSE351 is here. Some of the details don't apply to us (they use a different machine, for instance) but the core Linux material is the same. There are some screenshots showing gdb in action debugging assembly language code, which will be useful after a few weeks of the course..

The textbook web site (linked on our main page) contains links to various Linux tutorials and summaries. Much other information is available using the man command inside Linux and searching on the web. If you want a printed source, we recommend The Linux Pocket Guide by Daniel Barrett.