安装 zsh

sudo apt-get install zsh

编辑 ~/.zshrc

setopt PROMPT_SUBST
{% raw %}PROMPT='%B%F{yellow}[%D{%H:%M:%S}]%f%F{red}[%n@%m%f:%F{blue}${${(%):-%~}}%f%F{red}]%f$ %b'{% endraw %}
TMOUT=1
TRAPALRM() {
	 zle reset-prompt
}

重新设置提示符

source ~/.zshrc

或者

zsh

效果图