UNIX Commands (page 2), or UNIX intro (page 1)


Optional history lesson (UNIX part 1A)

Both the UNIX operating system and the word "terminal" date back to the days before small personal computers, when users sat at devices called terminals connected to one multi-user mainframe computer. A program like "Terminal" on the Macintosh or PuTTY on a Windows computer "emulates" one of those old terminals. (The "TTY" in PuTTY's name is short for "TeleTYpe." See Wikipedia for more terminal emulator history.)

An early terminal was not a full-function computer. just a keyboard and display; the display could be either a teletype-like printer or a CRT screen. If you think of the computer terminal as a lineprinter, the"command-line" of the UNIX shell makes sense. You type a command on the current line; the computer prints its response; you type a new command, and so forth.

Whether a printer or a glass tube, an old terminal might display only upper-case characters in a single type font, with no color and no "what you see is what you get" touches, like bold or underlined text.

The fact that basic terminals "entered commands" one line at a time may explain why an important key is marked "Enter" on some keyboards. On the other hand, "Return" was a more descriptive word for what the typewriter key did: "return to the start of a line."

(In fact, the Enter or Return key usually sends two separate codes to the computer, CR and LF, "carriage return" and "line feed" since a teletype machine could do those two things separately. Why would you want to return the typing carriage without feeding a new line of paper? So that you could add underlining or XX out your mistakes. Today, ghosts of this old system turn up in text editing programs, some of which are written to use only one symbol to create a new line, LF or CR, some of which are written to use the other. Some Microsoft Windows versions of Notepad require both symbols, and will display a Unix or Macintosh text file as one long unbroken line. WordPad doesn't have that problem.) For more of this technical trivia, see this Wikipedia NewLine page.

The first terminals really were little more than teletype-style typewriters. You typed something; the computer typed back something. When more sophisticated terminals became available, the old ones were sometimes called "dumb terminals."

The early video display terminals, which were a little smarter, had model names like VT52 and VT100. They still had no mice, so the keyboard was the only way to give instructions to the computer, either by typing on a "command line," or by running programs that recognized special key combinations to control the program.

That's the origin of the key labeled "control" that we still have on Macs and PCs today, and you can still use it to perform special functions within UNIX programs.

Back: UNIX intro front page
Next: UNIX Commands, then Going Public