Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # If id command returns zero, you’ve root access.
- if [ $(id -u) -eq 0 ];
- then # you are root, set red colour prompt
- PS1="\\[$(tput setaf 1)\\]\\u@\\h:\\w #\\[$(tput sgr0)\\]"
- else # normal
- PS1="[\\u@\\h:\\w] $"
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement