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

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

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

Enter your comment:
231 +5 =
 
  • linux/misc/normal_prompt.txt
  • Last modified: 2019/10/31 09:05
  • by 127.0.0.1