How Do I Clear History in Linux?
Contents to Clear the Entire Contents of the History File, Execute History -C. the History File Is Stored in a File That You Can Modify, as Well. Bash Shell...
Contents
To clear the entire contents of the history file, execute history -c . The history file is stored in a file that you can modify, as well. Bash shell users find it in their home directory as . bash_history .
How do I clear bash history in Linux?
How to clear bash shell history command
- Open the terminal application.
- Type the following command to to clear bash history completely: history -c.
- Another option to remove terminal history in Ubuntu: unset HISTFILE.
- Log out and login again to test changes.
21 дек. 2020 г.
Where is history file in Linux?
The history is stored in the ~/. bash_history file by default. You could also run ‘cat ~/. bash_history’ which is similar but does not include the line numbers or formatting.