Just a little UNIX (and computer history)

for COMS 326 Web Production students

by Bob Stepno

Most Web pages these days are created with Content Management Systems or dedicated Web page editors like Adobe's Dreamweaver or Apple's iWeb. However, you also can edit your http://www.radford.edu/~yourusername Web (HTML) pages with the simplest of text editors, even edit them directly on the Web server, which is a UNIX computer somewhere across campus. At Radford, you get there by connecting to your "H drive" or "Home" space using a terminal program. This page of mine tells you how.

On any Macintosh, the terminal program is actually named "Terminal." On campus Windows machines, you can use PuTTY, a free program you can download for your own PC, with online documentation and FAQ file to get you started. (Why the weird name? The letters TTY are the old abbreviation for "teletype" the original online terminal. I don't know about the "e;Pu"e; part, other than that it's the symbol for plutonium, and that those two letters make the name a pun related to windows.

With both Mac Terminal and Windows PuTTY you use the Secure SHell protocol, SSH, to safely connect with the remote computer or "host." SSH is built into PuTTY; on the Mac, SSH is a program you run within the terminal.

To login to the system, combine the "host name" with your Radford computer system username (rstepno for me). Follow that with the "@" sign, the name of the host (server) you are connecting to (ruacad -- or rucs for computer science students), and its domain (radford.edu).

Either TTY/Terminal program opens a plain-text window on your screen. You can cut and paste plain text between other Macintosh or PC applications and the terminal. On a Mac, it's easier because the "command" key handles cut-and-paste shortcuts between programs just the way it does within a single application like Word. On a PC, see the item a.6.6 Copy and Paste in the PuTTY FAQ file. You can not use the standard Windows control-key shortcuts to cut and paste between applications, because the control key has special uses within the terminal itself.

On the Mac, you can make the terminal window and its type larger or smaller by holding the "command" key and pressing "+" or "-" (plus or minus). See PuTTY's setup screens for more information there.

(Read an Optional history lesson about "terminals")

Underneath its fancy desktop, each of our lab Macintoshes is actually a UNIX computer with the OS-X user interface running "on top" of UNIX. "Terminal" takes you to the UNIX level of the Macintosh, where you can use UNIX tools to create or delete documents and folders, run programs on the Mac, or connect to other UNIX computers on the Internet.

Getting and Putting Files

A graphical file transfer program like Filezilla or the MyRU Files tab makes file transfer easy, but you also can use UNIX command-line utilities to copy documents between the Macintosh and the RUacad file server. Two common utilities to securely copy are "sftp" and "scp." You run them like the "ssh" secure login program, by combining the program name with the server name, after which you are prompted for your password.

An SFTP sample:

An SCP sample: A friend who uses Unix more than I do warns that the SCP command can be tricky for beginners, especially when used with more than one file at a time. This SCP instruction page at Presbyterian College seems to agree with him. For a local example, this command syntax would copy the file from your Home directory on the Mac to the Home directory of your server space (your H drive). The punctuation must be perfect, and your username must be in two places in the command, once to prompt for your password and once to locate your home folder.

scp name-of-file.html yourusername@ruacad.radford.edu:/home/yourusername

Recap: The Web server that we see as http://www.radford.edu and the personal storage space we all see as an "H drive" is a server called "ruacad" when we connect with a terminal.

Macintosh confusion alert: Radford's computer network uses your e-mail username for two different workspaces -- your H-drive folder out on the network AND your personal folder on whichever lab computer you are using.
Unlike a Windows computer, the Macintosh does not mark the network folder with an "H:"
Learn to recognize which "myusername" folder you are working in! If it has a house-shaped icon, it's the Macintosh folder, not your H-drive. See my Macintosh tips.

Next: UNIX Commands, then Going Public