Home » Linux Tutorial » Prompt Trick: Add the clock to the prompt In this short article I will show you how to add the clock to your prompt. So, if you are want your prompt to look like this, [08:21:35] user@name:~$, add the following line to your ~/.bashrc . export PROMPT_COMMAND=”echo -n \[\$(date +%H:%M:%S)\]\ “ Related Posts Exclude User From The GDM Login Screen How to Add the Canonical Partner Repository on every Ubuntu Distribution Enable Edge Scrolling and Two-Finger Scrolling on Ubuntu 12.10 How to Install MenuLibre on Ubuntu 13.04 / 12.10 / 12.04 and Linux Mint 14 / 13 How to set a new PATH in bash, ksh and zsh