user non root list only $

I installed a new user on my new install of 9.2. When I log into that user the only thing displayed is $. It should be david-freebsd: /home/david $. How can I get the other parts to display? When I use root it displays ok.

Thanks.
 
For what it's worth, (not tested very hard though), a bash shell will, somewhat unlike Linux, require a $HOME/.bash_profile if you want to set the prompt. In Linux, one can use .bashrc (that doesn't get a tag because it's a Linux system), but in FreeBSD, I've found (but I repeat, I haven't tested this very much, it happened once and now that's how I do it), I would have to either set the prompt in $HOME/.bash_profile or, if setting it in .bashrc, have a line in .bash_profile reading
Code:
 source ~/.bashrc
 
Funkey said:
It is using /bin/sh. I will want to change that to bash.
To change sh into bash, either use (as root) vipw or the pw(8) command, or (as the user himself) chsh.

To change the prompt, add a line like the following to one of bash's startup files for interactive shells (e.g. ~/.bashrc):
Code:
export PS1="promptstring"
The exact syntax for promptstring is described in the manual: bash(1), see the section PROMPTING. That same manual also explains in detail how bash reads its startup files, see the section INVOCATION.
 
throAU said:
It's worth noting that bash is not part of the base install and will need to be installed from ports first.
Good call. Consequently, the exact path will be /usr/local/bin/bash rather than /bin/bash, as typically seen on Linux systems.
 
Back
Top