Eureka Moment Wiki

One eureka moment at the time

User Tools

Site Tools


Normal terminal prompt

Edit .bashrc and replace the PS1 variable with:

NOW=$(date +%Y-%m-%d)
PS1="\[\e[36m\][$NOW\[\e[m\]\[\e[36m\]@\[\e[m\]\[\e[36m\]\t]\[\e[m\] \[\e[32m\]\u\[\e[m\]@\[\e[32m\]\h\[\e[m\]:\[\e[31m\]\w\[\e[m\]\\$ "

This will result with

[YYYY-MM-DD@HH:MM:SS] user@root:/path$ _

Since .bashrc is executed last, this change cannot be made for all users


Enter your comment:
P Z᠎ P N I
linux/misc/normal_prompt.txt · Last modified: 2019/10/31 09:05 (external edit)