Advertisement
metalx1000

BASH PROMPT examples

Oct 5th, 2023 (edited)
1,579
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.88 KB | None | 0 0
  1. #notes https://linuxconfig.org/bash-prompt-basics
  2.  
  3. PS1="[PROMPT] "
  4.  
  5. #current working directory
  6. PS1="[\w]$ "
  7.  
  8. #host and user
  9. PS1="[\h]$ "
  10. PS1="[\u]$ "
  11. PS1="[\u@\h]$ "
  12.  
  13. #multiline
  14. PS1="[\u@\h]\n[\w]$ "
  15. PS1="╭─[\u@\h]\n╰─[\w]$ "
  16.  
  17. #date and time
  18. PS1="╭─[\u@\h][\d \t]\n╰─[\w]$ "
  19.  
  20. #colors
  21. PS1="\[\e[035m╭─[\u@\h]\n╰─[\w]$ "
  22. #reset color
  23. PS1="\[\e[035m╭─[\u@\h]\n╰─[\w]$ \[\033[00m\]"
  24. PS1="\[\e[035m╭─\[\e[034m[\u@\h]\n\[\e[035m╰─[\w]$ \[\e[00m\]"
  25. PS1="\[\e[035m╭─\[\e[034m[\u@\h]\n\[\e[035m╰─\[\e[036m[\w]$ \[\e[00m\]"
  26. PS1="\[\e[035m╭─\[\e[034m[\u@\h] \[\e[031m[\d \t]\n\[\e[035m╰─\[\e[036m[\w]$ \[\e[00m\]"
  27. PS1="\[\e[035m╭─\[\e[034m[\u@\h] \[\e[031m[\d \t]\n\[\e[035m╰─\[\e[036m[\w] \[\e[033m$ \[\e[00m\]"
  28.  
  29. PS1="\[\e[035m╭─\[\e[034m[\u@\h] \[\e[031m[\d \t]\n\[\e[035m╰─\[\e[036m[\w] \[\e[031m💀#\[\e[00m\] "
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement