CSE 374 16wi - x86-64 Linux for CSE 374

This document has some basic information about getting started with Linux. Please let us know about useful changes or additions that we should make 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. The bad news is that there are many, many ways to get access to a usable Linux system. That means you may run into problems that are due to your individual setup and it may be hard for us to help you diagnose exactly what is going on.

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. Many recent Linux distributions will be fine for almost all projects, and there are easy ways to set up your personal machine to run the necessary tools even if your own computer is not a Linux machine.

For our reference system we're using Fedora 22 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 should be able to use that as you work on your assignments, but you need to check your answers on the CSE configuration 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 (for OS X, available from vmware's web site, but free for registered CSE374 students via the VMWare academic program). Then you download a big, 4GB 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. See UWCSE's Linux VM web pages for details, but be sure to use the links at the top of the page to get the current F22 VM, not the older F20 one. After you do this, be sure to run Fedora's software update program (sudo dnf upgrade in a terminal window) 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.

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 dynamically allocated 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/).