Unix®
Unix is an operating system that runs on most computers. The primary Unix
server we use runs Linux, but note that
this is just a version of Unix. This
document introduces you to the basics of getting on, getting off, and
getting around a unix system. See here
for links to more resources. We also have a list of frequent problems and their solutions.
Background
The Unix system most commonly used on campus Io. This is an Intel-based Linux system located in the
basement of Gardner Hall. Its full name is io.uwplatt.edu, and
you can use that name to access it from anywhere on the internet.
Logging In and Logging Out
Use PuTTY to log in to Io - see here. Other SSH-compatible terminal programs should work
as well, but see the PuTTY notes for entering your
username and password. When you're successful, you'll see various messages
followed by a prompt like
101 name:
where name is your username.
Note that you will stay logged in to Io until you log out or break the
connection. The preferred way to log off is to just type "logout"
at the prompt. This ensures another student won't get access to your
files! The system will not completely log you out automatically
if you just kill PuTTY, so you need to use the logout command. If you get
a message saying "There are suspended jobs.", type logout a second time;
this will kill the extra jobs.
Accessing your Novell Netware files from Io
You can access your Novell Netware files from Io (that is, the files on
the J: and S: drives) by typing the command
nwmount
This will "mount" your J: and S: drives (after prompting you for your
Novell Netware password) so you can access your files from Io using the
same Unix commands that you use on other files. This means you can edit
your files using Windows (or probably even Macintosh) applications and then
run them against Linux commands from a PuTTY window. To unmount the two
drives when your done accessing them, type
nwumount
Other commands that you might find useful:
| df | List mounted volumes - this can be useful
to double-check that your Netware volume is mounted
|
| nwdir -v | Give additional information about Netware
files
|
| ncopy | Copy files on a Netware volume without
transferring them to Io - this can be useful for very large files
|
| nwgrant | Assign Netware permissions to files
|
| nwrevoke | Remove Netware permissions from files
|
As usual, see the man pages for the above for more details.
Transferring Your Files with WinSCP
Because Io requires SSH-based connections when typing in your password,
standard FTP (File Transfer Protocol) applications such as WS_FTP will not
work. The solution is to use WinSCP.
This is available through Start|Applications on campus, or you can download
your own copy. To run it,
- Enter the host name: io.uwplatt.edu
- Enter your username - don't enter your password
unless you're on a computer no one else uses!
- Make sure the File protocol is set to SFTP
- Click on the Login button
You'll then get a window you can use to drag files back and forth between
Io and your local system. You can also right-click on a file to open,
rename, delete, or edit it. (But note that can use the nwmount command as described above to edit the files in
Windows but access them directly from Linux.)
Warning: Be very careful when using WinSCP to not
click on the
button. This button will attempt to "synchronize" your local
directory with the current directory on the Unix system, deleting files
willy-nilly and generally making a mess of things. Worse, this command is
not undoable. Careful users select Options|Toolbars|Commands
Buttons to remove this tool bar.
Learning More
Being able to log in and transfer files is pretty much sufficient for many
classes. However, there are some other commands you might find useful:
- list files in current directory: ls (like DOS dir)
- copy files: cp source destination (like DOS
copy)
- rename/move files: mv oldname newname (like
DOS rename and move)
- remove files: rm filename (like DOS del)
- view file on the screen: more filename (like DOS
more)
To learn more about these commands, type "man ls" or "man
cp". In general, man command gives you a
description of the given command. Try "man man" to get a
description of the man command.
There are various ways to edit files on Unix systems. A simple one is to
use WinSCP as described above. But as you get more advanced you'll find
it's more direct to use one of the Unix editors; the editor most students
use is joe, short for
"Joe's Own Editor" (no relationship to Dr. Clifton). To use
joe, simply type
joe
at the prompt. If you then press Control-K H (hold down the
Control key, press K, release the Control key, press H), you'll get a help
panel showing you the list of commands. For examle, Control-K X
saves your file and exits. Regular characters just insert themselves (like
Notepad). Edit existing files by typing
joe filename
There are alternatives that are worth knowing about:
- emacs; this
is probably the most powerful editor available on Unix, and maybe anywhere
in the known parts of space. It isn't all that hard to use, but it does
take a little time to get started. Simply type emacs at the
command prompt to get started and run through the tutorial. See here for more
information about why you might even want to use Emacs on Windows. The
great thing about emacs is that it "grows" with you: the more you use it,
the more you learn, and the faster you get. Emacs is built on Lisp,
allowing users to extend it to solve any computable problem. The full
emacs
manual is also available. Emacs also runs on Windows.
- nano: This might be
the simplest to use editor on Unix; just type
nano file
where file is the name of the file to edit. The commands
(control codes) are printed at the bottom of the screen. Unfortunately,
nano has no way to "undo" edits, so if you make a big mistake about
all you can do is quit.
- vi: this might be necessary for system administrators, but
it's probably one of the hardest editors to learn to use. It's only
mentioned here because a lot of Unix users think this is the only editor
available. They couldn't be more wrong.
For more information about Unix, visit one of the following links:
If all else fails, you might try reading a book! The library contains a
number of good books, and O'Reilly® publishes
Learning the Unix Operating System, a short and sweet guide
covering Unix basics.
Other tools