Simple way to clean history under Linux

  

Linux system and Microsoft system are still different, but the concept of privacy of this protection system, no matter what kind of system you should not relax, such as used history is to clean up at any time, and teach you how to clean up the Linux system The history of the record.

Note: If it is a Linux server during the intrusion, don't forget the history command when there is no trace of the record when you record it!

1. Modify the /etc/profile file to set HISTSIZE = 1000 to 0. Or 1

Clear the user's home directory path. Bash_history

2. Immediately clear the history of history commands

History-C

3.bash commands are not immediately written to the history file, but Stored in the internal buffer, so it will also be written when bash exits.

However, you can call the history w' command bash to immediately update the history file.

History-W

It seems very simple, three steps will be able to get it, it seems to be easier to compare Microsoft's system, because we don't touch the Linux system often, so many common functions People still don't understand, so people who don't understand should take a good look.

Copyright © Windows knowledge All Rights Reserved