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 .

Watch Free Movies

export PROMPT_COMMAND=”echo -n \[\$(date +%H:%M:%S)\]\ “


Scroll to Top