Changing the command Prompt
I was wondering if anyone can tell me how to change command prompt? I'm running RedHat 8. When I log in as root, it looks likr this:
Code:
[root@users root]# Code:
-sh-2.05b$ Thanks Demon_Spawn |
Take a look in /etc. Look for a file which may be called bashrc or bash.bashrc. It may also be in profile. It may specify two different prompts: one for root and one for user. Just do some copy/paste to copy the root prompt to the user prompt.
If that doesn't work because you can't find anything about prompt (the line would start PS=), then look in /root for a hidden file (.bashrc). Copy the prompt line and paste it in your users .bashrc. |
I'll take a stab at it from memory, I don't have a box in front of me.
Code:
PS1="[\u@\h \w]\$ "; export PS1 |
okay I found "bashrc" in /etc. Heres what I see, and I'm as lost as a needle in a heystack... and if I make a change I need to reboot?
Code:
# /etc/bashrc |
There ya go, I was almost there - PS1="[\u@\h \W]\\$ "
-Kristijan |
All times are GMT -5. The time now is 01:10 PM. |