Please kindly help me add date time on history command.
I tried but not work on
1. login root
2. vi /etc/bashrc
#add below command
export HISTTIMEFORMAT='%F %T '
# su - [user]
# echo $HISTTIMEFORMAT
It can work on time but when I log out and login again. it go back...
The Linux history command is awesome by default, but you can make it better! By default, it'll only hold about 1000 past commands, but you can increase that - you can also add time/date to it so you can see when you ran each command!
In your ~/.bashrc file, simply add some lines like...