Logging out…

I do not know what you think about that, but I hate it if confidental information stays on screen after logging out of a terminal.

The solution is simple: echo clear >> ~/.bash_logout

The solution explained: On logging out bash parses the .bash_logout script. We just tell bash here to have the screen cleared.

You may also like...

2 Responses

  1. concerned user says:

    and then you press Shift-PgUp ?

  2. Stargazer says:

    if you are extra paranoid you could also reset the terminal before using ‘clear’…

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.