用 history 看過往下過的指令,預設不會顯示時間。方法是給HISTIMEFORMA,在 ~/.bashrc 裡面增加下面一行:
改完之後,登出再登入或是用 source ~/.bashrc就會出現2025-12-28 CST+0800 01:02:03