Introduction to Computing Resources for Stanford Linguists

Computers are an essential tool in the Linguistics Department. For example, all departmental communications are carried on over electronic mail (email). In addition, everybody uses computers to write and rewrite research manuscripts, class assignments, syllabi, etc. A variety of computing platforms are available, including Macintoshes, Windows PCs, and Unix workstations.


Macintosh computers are popular for their ease of use. The Department has several (older) Macs installed in offices and public areas, and there are many available around campus, notably at the Tresidder Lair (second story). If you want to purchase your own, Microdisc (inside the Stanford Bookstore) sells PowerBooks and other Macs at fairly good discounts, and the department can provide your office with an AppleTalk connection for getting your machine up on the net.

Stanford has site licenses for lots of Mac software, including the latest version of the Operating System, networking software (MacSamson), SLIP, X, Netscape, and Stanford software for searching local corpora, including the Oxford English Dictionary: Check the ``Site Licensed'' server in the Stanford AppleTalk zone. Although TeX is available for Macs, most Mac users around here use Word for their word processing. There are some very nice IPA fonts that work with Word: Ecological Linguistics (PO Box 15156, Washington DC 20003) and Linguist's Software (PO Box 580, Edmonds WA 98020-0580) are two good sources. There are also fonts and programs which help you draw syntactic trees, matrices, etc.

Outside of the department, there are hundreds of Macs freely available at various on-campus computer clusters.

Windows PCs

There are also several (Pentium) PCs available for public use around the department. These machines run both Windows 95 and Linux. Windows 95 is the default system that appears when you boot up the machine. The PCs have lots of software installed, including Netscape, Word and Xceed, an X Windows package.

Outside of the department, there are also more and more Windows PCs becoming available at various on-campus computer clusters.

Unix Workstations

Unix workstations are difficult to master but are the preferred choice of most computational linguists and other "power users". Most Mac and PC users also use Unix computers for at least a few tasks, especially reading email. Campus mail servers do support Macintosh mailers such as Eudora, but unless you always carry around your own PowerBook, convenience and security argue for processing your mail remotely on Stanford's Unix machines.

Aside from email, Unix machines offer some very nice programs for reading Usenet news groups (bulletin boards). People in the department also use Unix for running LaTeX, which is arguably the best system for producing high-quality paper documents. If you wish to study text corpora, you might find Unix useful because of its flexibility, and because the department has a large collection of corpora available from Unix machines.

The Leland System, a distributed network of Unix computers, is Stanford's primary academic computing infrastructure and is administered by Distributed Computing Consulting in Sweet Hall. The Leland System provides free computer accounts, email, web resources and other computing services to the Stanford community. Over 100 Unix workstations from various makers (Sun, DEC, IBM, etc.) are available 24 hours a day in Sweet Hall. In addition, the Unix servers Cardinal, Tree and Junior can be accessed remotely by anyone with a Leland account; most people use Cardinal to read email. At the beginning of each academic quarter, Sweet Hall Consulting offers a series of introductory classes open to all students, faculty and staff, covering topics such as basic Unix commands, email, file editing, the X Windows system, and Usenet newsgroups.

The Linguistics Department also maintains several Unix machines. All of our public Windows PCs also run the Linux variety of Unix. There are several Unix workstations available in the Phonetics Laboratory (in the basement of the Psychology building) for research in phonetics (see Edward Flemming or the Phonetics Lab RA for accounts).

Students and faculty affiliated with CSLI are given accounts on Turing, the main CSLI computer. People who receive their email on CSLI computers usually have email addresses ending in rather than

If you get accounts on more than one computer, remember to have all email forwarded to the computer you read your email on. On most Unix systems you just put your email address in a file called .forward in your home directory, and make that file readable: chmod a+r .forward But on leland you have to use the command lelandforward

Your first Unix session

When you arrive on campus, you have to open a Leland account and create a password. The account name is public information, but your password is top secret. The most acceptable password would have at least two letters, at least one non-letter, and be seven or eight characters (a character is basically anything that you can type in a single keystroke: `a', `A', `2' and `*' are all characters) long. Longer passwords up to 16 characters are accepted on the leland system, but you will not be able to use certain Mac-based services such as AppleShare. The system will reject passwords that are equal to your account name or some permutation of it (such as writing it backwards), words occurring in a dictionary, and various others, see the DCG page about leland passwords. The best password would be a collection of eight characters containing no discernible patterns. On the other hand, you might find that a random collection of eight characters like d8Jo-4*v is difficult to remember. If you pick a password that you can't remember, you will have no recourse but to write it down. And then you will need to keep that piece of paper in some convenient spot, which is not safe either. One way to make a password that is memorable but hard to guess is to base it on some text, preferably an obscure one that you do not go around reciting all the time. Build the password from the first letter of each word, finding a way to work in a non-letter. For example, if you use the obscure poem that begins `There was a young man from Nantucket,' your password might be TwaymfN,. The password is your only line of security, so pick a good one, don't write it down, change it once a year or so, and don't share it with your dearest friend.

Logging in

There are two ways to log in to Leland computers: directly, e.g. from a Sweet Hall workstation, or indirectly, e.g. from a Mac (using MacSamson) or remotely using a modem. If you are logging in indirectly, you will need to provide the name of the system you want to log in to. When prompted for this, type cardinal and hit Return.

If you are using one of the public Macs, make sure the program MacSamson is running and active. When it is, select from the File menu New Telnet session.... This will bring up a window with a field for entering the Host. Set this to cardinal (the other fields are not important), then click on the Open button. You will get a new window containing a connection to cardinal.

When you have connected to cardinal, it will display the request

At this point you should type your account name, then hit the Return key. You must type in your account name exactly as given to you. In particular you must observe the distinction between lower-case and upper-case letters. If your account name is wang, it is no use saying that should be capitalized just because that is your last name: Enter it exactly in that form. One of the distinctive properties of Unix is that it always cares about the distinction between upper and lower case.

The computer will then ask:

Type in your password exactly, then hit Return. You won't see your password on the screen (lest some passer-by see it as well).

If either the account name or the password was incorrect, the machine will reply

Login incorrect
and give you a chance to try again. You get three chances.

Once you have successfully logged in, the computer may type something like

TERM = (vt100)
It is asking you what kind of terminal you are using. For a Macintosh, vt100 is an appropriate answer. Type it in, then hit Return.

There is also a chance that you will be shown one or more messages. Some messages just appear every time you log in. For others, the computer first asks whether you want to see them. The correct answer is y then Return. If you don't understand the message, then it is probably safe to ignore it.

Unix commands

When you have logged in, Unix will run for you a special program called a shell. The shell gives you some kind of prompt (ending in >), at which you can type in a command. When you hit Return, the computer will execute the command, often typing output back at you. When you get another prompt, the computer is ready for the next command.

The simplest type of command for Unix is a simple word, followed by Return. For example, if you type

the system will print the current date and time. Henceforth I will refrain from mentioning that you need to hit the Return key after each command.

Logging out

It is very important that you log out when you have finished using the computer. For one thing, anybody could come along and destroy all your files in eight keystrokes. More likely, you will cause the next user a good deal of trouble as they try to figure out if you are really still using the computer, and if not, whether they can log you out without losing your work.

All you have to do to log out is type


I suggest you do this now, even if you are eager to explore further. This will give you a chance to practice logging in again, and you can try using your new password.

If you are working on a Macintosh, close the session window.

Things to do on Unix

Web browser: lynx

One of the first things you can do is surf the World-Wide Web (WWW). lynx is a program similar to the more familiar netscape, but it can run on vt100 terminals. A WWW page consists of text (there are also pictures and sounds, but you're not going to get these on a dumb terminal), some of which is specially highlighted to indicate that it is a link to another piece of text. You can hit the space bar to scroll through a page of text; the up and down arrows to select the previous or next link; the right arrow to go where the currently selected link points to; and the left arrow to get back to the place you were at before you followed the most recent link. You can also type G, then a URL, to go directly to some page on the WWW. This will work for all the URL's mentioned in this guide. http://www-linguistics/linguistics/ will get you to general information about the Linguistics Department. And you should definitely try URL http://doors/~sr/computing/, which contains links to almost everything you might want to know about computing, including information about local computers. Type H at any time to learn more about lynx, and Q to exit the program.

Text editor: emacs

Although you can just barely get by doing mail on cardinal without learning a text editor, you don't want to. In order to avoid sending mail with lots of typos and references like ``Forget everything I said two lines above'', you'll need to learn a program that lets you edit what you have already typed. And an editor is a necessity for writing and editing papers: You can save your papers to a file and edit them again later to make the unending stream of revisions that is the lot of the grad student. The editor you will want to use on Unix machines is called emacs. You'll want to learn it real soon. See URL for information about emacs. The Sweet Hall consultants offer introductions to Emacs.

Mail: elm

It's a bit harder to be dogmatic about choice of mail program. The system treats your incoming mail as one big long file of text in a file with your log-in name within directory /var/mail/. A mail program lets you treat this as a set of individual messages that can be read, deleted, forwarded, replied to, or saved in different files. It also makes it much easier to send mail messages. But mail program in general all do pretty much the same thing, Unix provides an astonishing variety of them, and you will find partisans here of each of them. You might want to consider mail, a very old program whose sole advantage is that it is found on all Unix computers, no matter how badly maintained they are; or rmail, a very old program whose sole advantage is that it is built into, and therefore fairly well integrated with, emacs. We recommend elm, which is new enough to have some fancy features, but old enough to have most of its bugs worked out. It is one of the most commonly used mailers on campus. Its interface is clear enough that you can pretty nearly make do by just typing elm and then playing it by ear. But do look at, and consider taking the Sweet Hall class on the subject; take the Emacs class first.

Your own mail address will be your Leland account name, to which is appended to, e.g., This is the form you should give out whenever people outside the department ask for your Internet mail address. But you don't really have to type such long addresses in most cases: You can truncate the parts of the address that you share with the recipient. So instead of sending mail to, you can send mail to myfriend@leland. (Similarly, you don't really have to include the part when accessing local URL's via netscape or lynx.)

News reader: nn

The Leland computers have programs for reading Usenet newsgroups. These are simply forums where people can publish open letters on a particular subject, and anybody can read them. There is a wealth of useful information in many news groups, and a huge amount of dross. It's up to you to decide whether the signal-to-noise ratio is acceptable.

We recommend that you use the news reader nn. There are thousands of groups out there, and so you might want to consider starting off small; otherwise you may find the wealth of material either tremendously frustrating, or tremendously addictive. The Unix man page explains all about nn: Type man nn. Or if you are really adventurous and want to get your feet wet immediately, type nn, then :man, then =.*, then Z, then hit the space bar to step through the manual that is built into the program. The manual is organized as a series of news articles within a news group dedicated to the nn manual, so you get to practice even before you know what you are doing. (Hint: to quit, type Q.)

Document processor: LaTeX

It is fast becoming de rigeur to produce articles and even your QPs in ``camera-ready'' format: nicely typeset with justification, multiple founts, and fancy characters just like a published journal article. Everybody here uses either Word or LaTeX. It is radically different in philosophy from Word. Whereas the latter is WYSIWYG (What You See Is What You Get), LaTeX users edit a file that looks nothing like the final paper, which is produced by running a typesetting program over that source file. This has obvious advantages and disadvantages. Most people would agree that the decisive factor is that LaTeX documents are generally prettier.

Some students feel that since Word is by all accounts easier to use, they will start off using Word then switch to LaTeX when the time comes to submit a really fancy paper somewhere. Keep in mind though that that day is coming much sooner than you think. Since the two systems are completely different, learning Word will not prepare you for learning LaTeX, and so you will have to start learning again from scratch, precisely at that point when you have no time to learn a stupid document processing system. See for more information on LaTeX. And by all means cajole your fellow students for their source files, to use as a pattern or for inspiration.

Graphics: X

Unix has a windowing system similar in principle to that of Macs or Windows. It's called X Windows, and it lets you do some nice things like run Netscape (which you could do on a Mac anyway) and preview the quality of your LaTeX documents (which our Macs aren't set up for). X Windows of course requires graphics-oriented displays, such as those found on SparcStations or HP workstations. A the beginning of each quarter, Sweet Hall Consulting offers an introductory class on the X Windows system.

Final words of wisdom

The best way to become a computer guru is to take advantage of the wisdom of your peers in the Department. Ask your colleagues what they do, get examples of their LaTeX files and Unix configuration files, and just hang out and watch them at work. Countless thousands of hours are wasted annually because people don't do this.

(Original version by Brett Kessler 1995, updated by John Fry 1997)