File that defines root command prompt?
For RH 7.2:
what file is it that defines the default root command prompt? I know you can modify the .bashrc file to alter this but I wanted to look at what makes up the root user's command prompt.... more specifically, what is it that displays the "#' or "$" symbol depending on what type of user you are... I have tried \$ but this is reversed from what it should be.... when I say should be I mean: # for root $ for any other user (i believe) thx in advance... :Pengy: |
that prompt itself is defined by the PS1 variable:
echo $PS1 |
ok.... I knew that but didn't think to look at where that variable was defined...
thx! |
normally a default is provided in /etc/bashrc, otherwise in ~/.bashrc as you already said.
|
my problem was this:
i had changed my PS1 to be this: PS1="\u@\h \w\n\$ " but this was needed to produce the desired effect: PS1="\u@\h \w\n\\$ " I have read about why this happens but just forgot... :tisk: |
there is a bash shell variable called "PS1"
"echo $PS1" to see what it is now, then change the symbol at the end Example: [root@cxo336745ew sysconfig]# echo $PS1 [\u@\h \W]\$ Note: There is a "\" before the $ because its an escape character. [root@cxo336745ew sysconfig]# PS1="[\u@\h \W]% " [root@cxo336745ew sysconfig]% Then you can put it in your .bashrc file -K. |
Re: File that defines root command prompt?
:D thx!
|
All times are GMT -5. The time now is 09:33 PM. |