fireraisr
Posts: 81
Joined: Wed Nov 23, 2011 2:34 am

Bash Prompt Customization Issue

Thu Jul 12, 2012 2:42 am

Hey Guys,
I have a weird problem. I created a new user and assigned them a home directory. But, when I log in as that user all I get is a $ prompt.

I like the format of "user@raspi$ " as a baseline configuration.

I tried to modify the PS1 variable but it's not taking the usual switches.
So far I've only been able to get it to output plain text and other variables.

example:

Code: Select all

export PS1='\u@\h:\w\$ '
yields: \u@\h:\w$

Code: Select all

export PS1='$PWD\$ '
yields: /home/basicuser$

This is really screwing with my head. Any suggestions are appreciated.

User avatar
jojopi
Posts: 3317
Joined: Tue Oct 11, 2011 8:38 pm

Re: Bash Prompt Customization Issue

Thu Jul 12, 2012 3:14 am

I suspect your new user has /bin/sh as login shell. This is not really intended for interactive use. "chsh -s /bin/bash".

fireraisr
Posts: 81
Joined: Wed Nov 23, 2011 2:34 am

Re: Bash Prompt Customization Issue

Thu Jul 12, 2012 3:25 am

Yep, that did it. Never would have thought of that.
Thanks for the help!

Return to “Advanced users”