linux:misc:normal_prompt

no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


linux:misc:normal_prompt [2019/10/31 09:05] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +====== Normal terminal prompt ======
 +Edit .bashrc and replace the PS1 variable with:
  
 +<code bash>
 +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\]\\$ "
 +</code>
 +
 +This will result with 
 +
 +<html><span style="background:black; padding:15px;"><span style="color:lightblue">[YYYY-MM-DD@HH:MM:SS]</span> <span style="color:green">user</span><span style="color:white">@</span><span style="color:green">root</span><span style="color:white">:</span><span style="color:red">/path</span><span style="color:white">$ _</span></span></html>
 +
 +
 +Since .bashrc is executed last, this change cannot be made for all users
  • linux/misc/normal_prompt.txt
  • Last modified: 2019/10/31 09:05
  • by 127.0.0.1