# sign instead of $ when user terminal
I just did a clean install of Slackware 15, everything went well except I have 2 problems. when in user mode terminal displays a # sign.
I have searched and tried everything I found on web but to no joy. My second problem is that I cannot get .bashrc to run when in root to be able to add colors, aliases etc. I assume that one problem solved will probably correct both. but I have not been able to find that solution. https://www.linuxquestions.org/quest...eply&p=6163004 I found the answer in my own posts from about 18 months ago. getting old is not always fun! |
|
Here's what I use:
Code:
# ~/.bash_profile ###################################################### Code:
# ~/.bashrc ############################################################ |
Quote:
|
PS1=$ will display a '$'
PS1=\$ will also display a '$' PS1=\\$ will display a '$' for non-root and a '#' for root. And if that \\$ is followed by a word that could be interpreted as a shell variable, you need to do: PS1=\\\$word Also, whether or not you use single or double quotes or not can confuse matters. When setting PS1, you need to get the shell-escaping right in order to get the desired result. |
you can find good pages on the net regarding PS1, like this: https://bashrcgenerator.com/
|
For what its worth here is my .bashrc:
Code:
FILES=~/.config/bash/* Code:
$ls ~/.config/bash/ Code:
$cat bashPrompt The chances are you do not want to do it the way that I have |
You didn't, on the off chance, make your user UID 0 did you? (i.e. that is allowed so you can have multiple root accounts by doing that)
That would cause your prompt to show # |
All times are GMT -5. The time now is 03:13 AM. |