Low Orbit Flux Logo 2 F

Linux Command - History

The linux history command shows a list of previous commands with line numbers. Modified entries start with ‘*’;

Show history:


Show most recent 5 lines:

history 5

Clear history for current shell:

history -c

Overwrite history file:

history -w

Purge all history:

history -wc

Delete history entry at this offset:

history -d

History is saved here:


Set this variable to see the date and time for every command in history:


Add to .bashrc if you want to keep the setting:


export HISTTIMEFORMAT='%Y-%m-%d %T '