Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I do that? I want to clear everything as well as not log anything from now on.

share|improve this question
up vote 10 down vote accepted

To clear the history

history -c

To stop new bash commands being added to the history


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.

share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.