[Chapter 22] 22.18 Clear Your Terminal for Security, to Stop Burn-in
Author: Jerry Peek, Tim O'Reilly & Mike Loukides
Date: 1998-08-04T21:40:40Z

#

| Chapter 22 File Security, Ownership, and Sharing |

## 22.18 Clear Your Terminal for Security, to Stop Burn-in

The clear command reads your termcap or terminfo (5.2) entry to find out how to erase your screen, then it sends that command. If you're typing something confidential that other people shouldn't read, just type `clear` at a shell prompt when you can. Many UNIX programs let you do a shell escape (30.26) to run a single UNIX command - you can clear your screen that way, by typing something like `!clear` from inside the program.

> NOTE: Some terminals and window systems have memories - scrolling buffers that save previous screens or the current one. The clear command probably won't clear those. Check your manual to find out how - or, if you're desperate, log off UNIX, then turn off your screen's power for a minute.

If you leave your desk for a long meeting or for the day, then remember that you didn't erase your screen, you can probably clear your screen from another user's terminal. (If your system has the tty-group-write protection (22.13), then you'll have to log in or su (22.22) to your account from the other terminal first.) If the other terminal has the same terminal type, use the command:

    who
    % who | grep yourname
    yourname    ttyp3   Jun 24 10:44
    % clear > /dev/ttyp3

If you're on a different type of terminal, you'll need to set the TERM environment variable temporarily (6.10) before you use that command.

- JP

22.17 Ways of Improving the Security of crypt |  | 22.19 Shell Scripts Must be Readable and (Usually) Executable