K
K
Koal Koalich2019-01-18 12:29:26
linux
Koal Koalich, 2019-01-18 12:29:26

How to change the prompt line and why the arrows do not scroll through the history?

The following instruction worked:
1. create a user:
useradd -m username
2. set the password password
passwd username
3. remove it from sudo (must!):
gpasswd -d username sudo
4. add it to the www-data group
gpasswd -a username www-data
The user has been created, everything is fine, but the prompt line is now just $ and export PS1= 'what I want' does not help - it still remains $
And second: the arrows do not scroll the history, but drop out to the console ^[[A, for example .
WHAT?

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
X
xibir, 2019-01-18
@xibir

It was the default in Debano distributions other than bash.
Change shell.
And for the future it is necessary to fulfill

sed -ri 's|SHELL=/bin/sh|SHELL=/bin/bash|' /etc/default/useradd

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question