You probably did not create your new user with useradd -m. The -m copies the default ("skeleton") shell profile files from /etc to new users home dir.
To resolve the issue, recreate the account or just copy the .bashrc, .bash_profile and .profile files from some other user account or from /etc/profile/.
I have been having the exact same problem. Turns out there is an alternative to "useradd" called "adduser". This automatically copies the skeleton and everything needed.
adduser <username>
This code prompts you to fill in information about the user, and copies everything needed (as well as setting up a user directory).
You probably did not create your new user with
useradd -m
. The-m
copies the default ("skeleton") shell profile files from /etc to new users home dir.To resolve the issue, recreate the account or just copy the
.bashrc
,.bash_profile
and.profile
files from some other user account or from/etc/profile/
.You might also take a look at PS1 environment variable. If you type
export PS1="$ "
, your prompt will be just a dollar sign.I have been having the exact same problem. Turns out there is an alternative to "useradd" called "adduser". This automatically copies the skeleton and everything needed.
This code prompts you to fill in information about the user, and copies everything needed (as well as setting up a user directory).
After running the
env
command under my new user I noticed that:If you run the
useradd
command withuseradd -ms /bin/bash [USERNAME]
then it should work as expected.-s
allows you to modify the default shell.