4

That should be something obvious, but I can't seem to find a way to fix it.

I am using iTerm and logging in to Ubuntu server remotely.

This is what I see when I press arrows:

$ ^[[A^[[B^[[C^[[D

User was added via useradd so the home folder is empty. How can I fix arrows?

Thanks

firedev
  • 153

1 Answers1

5

Those arrow keys work if you use an appropriate shell like bash.

The $ is a a clear indicator you are not using one of them (otherwise you would, by default, see more than just a $ as a prompt).

You should have done something like this:

useradd -u {username} -d /home/{username} -s /bin/bash -p {password}

You do not have to recreate the user though; Afterwards you can change the shell (permanently) when logged into the user:

chsh -s /bin/bash
Rinzwind
  • 309,379