Jump Straight to Directions for Cancun
This document has some basic information about getting started with Linux. The details are specific for this quarter, and may not translate to other quarters. 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.
In 374, this quarter, we will rely on one specific department computer running Linux. This will facilitate debugging and grading. 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 Linux is 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.
To get started you will want to follow the directions to log in to a department computer running Rocky Linux.('Linux' refers to an operating system kernel, and there are many different distributions, or packages of software, built on that kernel. Most distributions look similar and work similarly, but, there are some differences in the details. CentOS is one very popular distribution, Rocky is a recent fork of the CentOS distribution.)
Ultimately, 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. Once you learn how to use the shell and its tools you will be able to transfer those skills to other Linux distributions.
You may want to start building your flexibility with Linux by ensuring that you can use more than one of the systems available.
Cancun is a CSE provided Linux machine. Each student is provided access using their UW user id and passwords. Each student also has some limited storage space on this machine, for use during CSE 374 course work.
If you have a command-line (terminal) interface on your system, you can use ssh to log in:
$ ssh your_uwnetid@cancun.cs.washington.edu
You'll need to enter your password to log on. If this is the first
time you've accessed cancun
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.
Note that the remote machine (cancun) will not echo your password as you type it, so you won't see any visible indication that it is being typed. This is a security feature so that nobody can look at your screen to discover your password. The system is still reading the characters you type and will process them when you hit return after you've typed the entire password.
You can use the scp
command to transfer files
between the remote machine and your local machine. Usually this is
easiest to do by issuing the commands on your local machine to copy
files to or from cancun
, rather than trying to
run scp
on the remote machine itself. This is because
cancun
has a well-known internet address, while
your machine may have a different dynamically allocated address each
time you use it, so it is easier to set up the connection starting
from your local machine. For example, to transfer a
file foo.txt
from your home directory on cancun to the
home directory on your mac, open a terminal window on your mac and
type in the following command:
$ scp user@cancun.cs.washington.edu:~/foo.txt ./(Don't forget the
./
at the end, which says to copy the file into the
current directory - or you can replace that with whatever
destination filename you wish. You can omit user@
if your userid on your local machine is the same as your cancun
userid.)
There are many graphical and command-line applications for Windows that can be used for ssh
logins and scp
file transfers. You may use whatever you are comfortable with. One simple option is to use the Powershell interface to the Windows shell, as demonstrated in class.
Another useful set of tools is 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 (cancun.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. As mentioned
in the mac section, for security reasons, cancun
will not
display your password as you type it, but it is receiving the
characters and will process them when you hit return.
The CSE department provides a virtual machine for students to use. This virtual machine allows you to run a 64-bit Linux distribution on your home computer, and it may be a pleasant way to interact with Linux. This machine is not supported for this quarter's 374 but for some students it may be a nice tool in addition to the server described above.
See UWCSE's Home VM web pages for details and links to get the current CentOS
VM. After you do this, be sure to run the software update
program (sudo yum update
in a terminal window) to install
any 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. (Installing the VMWare virtual machine software
may also take some time and require rebooting your machine a couple fo times.)