How do I do that? I want to clear everything as well as not log anything from now on.
Asked
Active
Viewed 763 times
2 Answers
10
To clear the history
history -c
To stop new bash commands being added to the history
unset HISTFILE
To stop history permanently for you
echo "unset HISTFILE" >> ~/.bash_profile
To stop history permanently for all users
echo "unset HISTFILE" >> /etc/profile
For information the history is stored in your home folder as ~/.bash_history.

Richard Holloway
- 7,456
- 2
- 25
- 30
2
Clear history:
history -c
for a single user, find /home -name .bash_history -delete
for any user whose $HOME
directory is in /home
.
Disable history: Put unset HISTFILE
in your ~/.bashrc
or in the global /etc/bash.bashrc
.

joschi
- 21,387
- 3
- 47
- 50