Linux: zsh Prompt Setup

By Xah Lee. Date: .

Add date time and color to zsh prompt.

xah zsh prompt 2020-12-29 cPsnr
xah zsh prompt 2020-12-29
# user host datetime path $ or #
PROMPT="%F{red}%n@%m %D{%Y-%m-%d %H:%M:%S} %d %#%f

Put the lines in /Users/xah/.zshrc

Here's what the special character means:

Shell Prompt Setup

If you have a question, put $5 at patreon and message me.

Linux Shell Basics

Sys Admin


Linux Desktop