In contrast to proprietary systems like DEC's VMS or
IBM's VM, Unix was written so that users may use terminals from
any vendor. That being the case, for Unix to properly format output to
your screen, the system must know your terminal's characteristic
quirks. You tell Unix what kind of terminal you are using by setting
the environmental variable TERM to a name corresponding
to your terminal type. If the setting is improper, you
may see:
% vi .cshrc Let's edit the .cshrc file. Unknown terminal type - all I have is 'dumb' [Using open mode]
With an incorrectly set terminal, editors and listing commands will act incorrectly. For example, editors may have problems adding new lines, and pagers may not scroll properly.
To set your terminal type, you set the environmental variable TERM. In sh or ksh this is done with export,
in csh with setenv :
% echo $TERM Tell me present terminal setting. dumb Don't take this personally. ksh$ export TERM=ansi A popular generic terminal. csh% setenv TERM ansi A popular generic terminal (csh).
More specific terminal characteristics are reported and set
with the stty command. There are BSD and POSIX
versions:
% stty No options, show characteristics. speed 9600 baud; evenp hupcl clocal The characteristics. brkint -inpck -istrip icrnl -ixany % stty everything Display everything, -a for System V. % Ctrl-J stty sane Ctrl-J Reset terminal after being messed up.
Once you have the terminal characteristics which you like and which work for you, you can put them in your .login file and not worry about it again. To learn more about stty and its options, refer to the man pages.