Special keys

Most of the keyboard characters are ordinary displayable characters with an obvious meaning, but some have special significance to the computer. The RETURN (sometimes labeled as Enter) key signifies the end of a line of input; the shell echoes it by moving the terminal cursor to the beginning of the next line on the screen. RETURN must be pressed before the shell will interpret the characters you have typed.

RETURN is an example of a control character--an invisible character that controls some aspect of input and output on the terminal. If you press the keys Ctrl-m (that is, press Ctrl and m simultaneously) the effect is the same as pressing the RETURN key.

By typing Ctrl-c, from the terminal, you can kill most running programs or commands. (Thec stands for cancel.)

Another important control character is Ctrl-d, which tells a program or a command that there is no more input. For example, typing Ctrl-d on the terminal will signify to the shell that there is no more input from the user and it will log you out. Ctrl-d can also be thought of as an “end of file.”

Typing Ctrl-z suspends a running program. (The z stands for zzzzzz's or sleep) Type fg (for foreground) to restart.

Ctrl-s stops your screen from scrolling and Ctrl-q resumes scrolling. On most keyboards there is a Scroll Lock key for the same purpose.

Here is summary of the control characters.

Control Character Action
Ctrl-c Cancels the program running on the command line
Ctrl-d Tells a program that there is no more input (similar to an End of File)
Ctrl-z Suspends the program running on the command line
Ctrl-s Stops your screen from scrolling
Ctrl-q Resumes scrolling it was stopped