How to clear command history using Linux history command
How to clear command history using Linux history command.
The Linux command history is a list of Linux command that you execute in or on current shell session. This list of command history is store inside your home directory, in hidden file called ".bash_history". The default configuration of command history can store up to 500 entry of your previous executed command. This list of history command is quite annoying if you want to hide your track or if you want to hide the command entry that you have execute in your shell session. The example below show how clear command history using history command.
Example on How to clear command history.
1. Login on the system and open new shell session.
2. Execute history command with -c option as show on example below.

[linux@fedora11 ~]$ history -c
[linux@fedora11 ~]$
3. Type in history command again to verify that you clear all history command, you should get the output from the history command as show on example below.

[linux@fedora11 ~]$ history
1 history
[linux@fedora11 ~]$
Keywords: clear command history, clear history command, clear history, history command, bash_history
- Add new comment
- 611 reads
- Tell your friends

Recent comments
17 weeks 36 min ago
21 weeks 2 days ago
21 weeks 2 days ago
24 weeks 6 days ago
24 weeks 6 days ago
30 weeks 15 hours ago
30 weeks 19 hours ago
30 weeks 1 day ago