How Do I Clear Session History in Linux?
Contents There’s Your Current Sessions’ History, and There’s Your Long-Term History. Our First Command, History -C, Deals with the Current Session. the History...
Contents
There’s your current sessions’ history, and there’s your long-term history. Our first command, history -c , deals with the current session. The history command is built into Bash itself, and the -c modifier tells the program to clear that history.
How do I clear history in Linux?
Removing history
If you want to delete a particular command, enter history -d <line number> . 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.
Must Read
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 г.