How can I change the default prompt in Linux (red-hat 5.4) from "#" to ">"? example
[root@moon11 root]#
to
[root@moon11 root]>
|
feedback
|
This question came from our site for professional and enthusiast programmers.
|
This is defined in your ~/.bashrc file in the variables PS1 and PS2. Find their values and change # to > . Take a look at bash variables and controlling the prompt. EDIT: In my ~/.bashrc file if I change
to
it does the job. | ||||
|
feedback
|
|
My answer: Don't do it ! The fact root's prompt is by default If you change your prompt to | |||||||||
feedback
|
|
Keeping in mind the other answers' recommendation to avoid reducing root's visibility, here's a useful guide to bash prompt editing that a college associate made many years ago: Bash Prompt HowTo | |||
|
feedback
|
#in the prompt to remind you that you are playing with fire because you have root privileges and any mistakes can completely wreck the machine. You should always do as little as possible while running as root. – Jonathan Leffler Dec 15 '11 at 8:21