Add timestamps to history command

linux history command

Many we want to know the time of execution of command in linux system.

By default, with HISTORY command we can get the list of previously executed commands but it doesn’t provide the time of execution.

Here is variable which you can set to get the time stamp in your history command.


Output after applying it

Make this change permanently, perform following commands

Lets make it persistent, configure it permanently in ~.bashrc file

To make it immediately effect, execute following command

# source  ~/.bashrc

Thanks for your reading it out, Let me know if you have any questions or queries.