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.
To get started you will want to choose one of the two systems below - either log into a department computer running a CentOS Linux, OR, download and use the department virtual machine 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.)
In 374 we will rely on those systems as reference systems, which 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 one of the CSE configurations to be sure there are no subtle differences that cause problems when we evaluate your work.
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 not one, but both, of the systems described below. Personally, I use the virtual machine to give me a nice environment on my computer, while allowing easy access to the department's servers, including cancun.
If your hardware supports it, the "home virtual machine"
will allow you to run 64-bit Linux on your own computer. 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.)
Everyone in the class has an account on this machine, which is a very similar Linux image as the home VM. You will be able to log in using your UWNetID. 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, and because it is fun.
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 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 cancun
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 cancun
itself. 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. 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 (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. Once you log in we suggest using the passwd
command on cancun
to change your password. 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.