Eureka Moment Wiki

One eureka moment at the time

User Tools

Site Tools


linux:misc:normal_prompt

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

Discussion

Enter your comment:
O Y I R K
 
linux/misc/normal_prompt.txt · Last modified: 2019/06/10 13:42 by tplecko