Right from the command line you can set the HISTTIMEFORMAT variable that determines the format of your history.
To set this variable simply type:
HISTTIMEFORMAT="%d/%m/%y %T "
Now check your history:
You should see an output like this:
2027 20/08/15 14:32:05 top -u 2028 20/08/15 14:32:16 ps -ax|grep goats 2029 20/08/15 14:32:17 uptime 2030 20/08/15 14:32:22 HISTTIMEFORMAT="%d/%m/%y %T " 2031 20/08/15 14:32:24 history
You can set this variable in your .bashrc file so that it takes effect during every shell session.
Open .bashrc to edit:
And add the following:
export HISTTIMEFORMAT="%d/%m/%y %T "
Now save, quit, and source this file:
Here's a bit more on HISTTIMEFORMAT from gnu.org documentation:
If this variable is set and not null, its value is used as a format string for strftime to print the time stamp associated with each history entry displayed by the history builtin. If this variable is set, time stamps are written to the history file so they may be preserved across shell sessions. This uses the history comment character to distinguish timestamps from other history lines.