Programming Wiki: [[LinuxNotes]]

Programming Wiki : BashTips

WikiHomePage :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register


Bash Tips

Fancy Prompts

For user. Dark Greys with red username, long paths.
PS1='\[\033[1;30m\][\[\033[0;31m\]\u\[\033[1;30m\]@\[\033[1;30m\]\h\[\033[1;30m\]] \[\033[0;37m\]\w \[\033[1;30m\]$  '

For Root. Yellow root, blue host, short paths.
PS1='\[\033[1;30m\][\[\033[1;33m\]\u\[\033[1;30m\]@\[\033[0;34m\]\h\[\033[1;30m\]] \[\033[0;37m\]\W \[\033[1;30m\]#  '

Dark grey and yellow.
PS1='\[\033[1;33m\][\[\033[1;30m\]\u\[\033[1;33m\]@\[\033[1;33m\]\h\[\033[1;33m\]] \[\033[0;37m\]\W \[\033[1;30m\]$  '

Blue, purple, dark grey. Return color to default grey:
PS1='\[\033[1;30m\][\[\033[1;34m\]\u\[\033[1;30m\]@\[\033[0;35m\]\h\[\033[1;30m\]] \[\033[0;37m\]\W \[\033[1;30m\]\$\[\033[0m\] '

There are no comments on this page. [Add comment]

Powered by Wikka Wakka Wiki
Page was generated in 0.0144 seconds