Click to See Complete Forum and Search --> : Problems with BASH prompt
I am trying to set my command line prompt to be the current directory I am in. I am setting PS1="\w >>", then exporting PS1. I am doing this in the /etc/profile file. Somehow, it always gets set to "bash-2.05#". I don't see any ~/.bashrc files, or even a /etc/.bashrc file. Does anyone have any ideas on where this keeps getting set?
Thanks
PLBlaze
08-22-2001, 12:20 PM
The /etc/profile sets the global vars for all users...the bash prompt that is set there looks somethin like this \u@\h : \w$ which would give you username@hostname : directory$.
To override this either correctly set the promt in /etc/profile for all user but do not mess with root one (denoted by #) or create .bash_profile in your home directory and set it there for yourself only.Here is a link to something i wrote about bash prompt how to set/color your bash promt (http://linuxdiscussions.org/howtos/colorbash.htm).Hope this helps.
Thanks.
Can I change the root prompt?
PLBlaze
08-22-2001, 12:31 PM
Yes you can change it but leave the # sign only for root...otherwise you will get confused.The # sign is exclusively reserved for root prompts/logins.Hope this helps again.
bdg1983
08-22-2001, 04:44 PM
Any file prefixed with '.' denotes a hidden file. You have to use 'ls -a' to also show hidden files, or if you are using a gui file manager, then look for a option in the toolbar or in preferences to show hidden files.