The operation of the serial interface is controlled by several system files (/etc/ttys and /etc/gettytab on BSD and other non-AT&T systems, and /etc/inittab and /etc/gettydefs in System V). Users can affect serial-line parameters with thecommand. In addition to normal communications parameters such as data rate, start and stop bits, parity, and so on, these parameters include such things as the translation of the carriage returns generated by most terminals into the linefeeds expected by most UNIX programs, division of input into lines, and definition of special control characters for erasing a character that has been typed, killing a line of typed input, and interrupting a running process.
One other area that termcap and terminfo do not control is terminal tab setting. This is done by the tabs command. For more information, see the manual pages on stty(4) and termio(7) (System V).
termcap and terminfo, by contrast, tend to control visual attributes of the terminal. The terminal capabilities defined for a terminal tell a screen-oriented program how big the screen is (for screen-by-screen paging and cursor movement), how to move to any point on the screen, how to refresh the screen, how to enter and exit any special display modes (such as inverse video, blinking, or underlining), and so on. [The screen size may be set in other ways, too. See article 42.5. -JP ]
But there is some overlap. For example, a terminal can be unusable because a program has left either the serial line modes or the terminal itself in an unexpected state. For this reason, , as performed by the tset and tput programs, initializes both the terminal and the serial line interface.
- from O'Reilly & Associates' termcap & terminfo, Chapter 1