0

my centos environment has just become bash shell prompt:

-bash-3.2#

how do I change it back to the usual # prompt? what places should I check for possibly modifications?

Update: I was not clear in my question: the prompt used to be just a single # and supports more syntax(a different shell script than bash 3.2 perhaps)? I would like to switch back to that. for example, ll is not longer supported in this bash shell

migrated from stackoverflow.com Apr 2 '12 at 5:11

This question came from our site for professional and enthusiast programmers.

  • Undo whatever you did that changed it? – Mat Apr 1 '12 at 11:00
2

set the PS1 environment variable, for more details: http://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html

After your update: maybe there is an error while you enter terminal and load user scripts? try:

su - yourusername

and see if there is an error than.

1

You can set your bash prompt in ~/.bashrc or if you want to do it globally in /etc/bash.bashrc

You mention 'the usual # prompt', but I'm assuming it doesn't always just show #. If you do want it to ever just show #, just setting "PS1='#'" in your bashrc would be sufficient. If you want more information on the prompt, I would suggest reading http://wiki.centos.org/TipsAndTricks/CustomizeBash or the more in depth http://tldp.org/HOWTO/Bash-Prompt-HOWTO/ .

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.