jacob
asked Dec 19 2019
edited Dec 19 2019
Answer
Use the following command to set the date and time
echo 'export HISTTIMEFORMAT="%d/%m/%y %T "' >> ~/.bash_profile
Then run the following command to set the environment
source ~/.bash_profile
Now run the command
history
1 12/12/19 17:21:34 cd
2 12/12/19 17:21:34 add-apt-repository ppa:openshot.developers/ppa
3 12/12/19 17:21:34 ping google.com
4 12/12/19 17:21:34 ip a
5 12/12/19 17:21:34 systemctl restart network
linuxhelp
asked Dec 19 2019
How to set History Display Date And Time For Each Command
I need to set the date and time for each command while using history. how to set the time and date for history command