I have installed ubuntu 19 on my virtual server and connected root user. Console appears like following:
root@localhost:~# And I created a new user useradd -m newuser
Added newuser to sudo group.
When I login with newuser, console appears only:
$: But, should it be like following?
newuser@localhost:~# 12 Answers
did you set the shell to /bin/bash or it is currently /bin/sh ? Check /etc/passwd either via less /etc/passwd or:
grep yourusername /etc/passwd Or to change the User's shell do (via root):
chsh --shell /bin/bash username and relogin with that user.
4I would like to respond to the question "why does not it automatically change when user created?"
You are using 'useradd', which works with the skeleton file /etc/default/useradd There should be a variable in there 'SHELL', which is the default shell that will be set when creating a new user with useradd.
You could also consider using the more user friendly 'adduser' instead of 'useradd'. Which uses /etc/adduser.conf as defaults.