Chapter 5. Setting Up Your Terminal

In This chapter:

  • Identifying Your Terminal Settings

  • What the Settings Mean

  • Changing Your Terminal Settings

  • Did Your Terminal Stop Working?

You interact with the shell through your keyboard, so it’s important to know which keys have special functions for controlling your terminal:[6]

  • As you issue commands, you’re bound to make typing mistakes. You can correct them by backspacing over characters or words and then retyping, or you can erase the entire line to start over.

  • Sometimes, you’ll want to move a slow-running command into the background so you can continue working, or kill a command that starts spewing out more output than you expected. These operations are done by typing special keys.

This chapter explains how to use the stty command to find out what your key settings are, and how to change them if you don’t like them. Your terminal is a tool that you control — it shouldn’t control you.

Identifying Your Terminal Settings

stty displays your current terminal settings. Its options vary from system to system, but at least one of the following command lines should produce output identifying several important terminal control functions and the characters you type to perform them:

% stty -a
% stty all
% stty everything

In the output, look for something like this:

erase kill werase rprnt flush lnext susp intr quit stop  eof
^?    ^U   ^W     ^R    ^O    ^V    ^Z   ^C   ^\   ^S/^Q ^D

Or like this:

intr = ^c; quit = ^\; erase = ^?; kill = ^u; eof = ^d; start = ^q; stop = ^s; susp = ^z; rprnt ...

Get Using csh & tcsh now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.