Question

Incorrect characters in console when pressing keys(up,down,left,right)

Incorrect characters, when pressing keys(up,down,left,right) on the console

Sample:

From the root with keyup

root@pc~# previous command From user with keyup

$ ^[[A
From user with keys(up,down,left,right)

$ ^[[A^[[B^[[D^[[C How to fix this? VPS - Ubintu 12.04 server.

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Since no one answered with the solution here it is: Apparently when you create new user using useradd and you don’t pass -s /bin/bash new user has some weird shell… So to fix it just run: chsh -s /bin/bash username (change shell command). If you can’t type while in “weird shell” run bash first.

when I press < (<) >(>) appears. Even when I paste "< " it changes to “>”. What’s the problem and how to fix?

Hello! <br> <br>I have (almost) the same issue, but switching keyboard didn’t seem to help me. I’m using a spanish keyboard in any case, and the same problem happens when connecting through SSH from Linux or from Mac. <br> <br>The particular problem seems only with non-root users in Ubuntu 12.04.3 x64. We have another couple of droplets using Fedora, and this problem doesn’t occur. <br> <br>In Ubuntu, root console is just fine, but non-root user’s console seems misconfigured or something: <br> <br>- Up/Down/Left/Right keys just print out: ^[[A^[[B^[[D^[[C <br>- There seems to be no command history (or maybe it’s because pressing Up key just doesn’t seem to work) <br>- Console prefix should look like: [<user>@<hostname> <path or directory>]$, but it only shows a “$” sign. It shows no username, no path, nothing. <br>- TAB to complete commands/paths/file names, doesn’t work either. <br>- Aliases like ll (for ls -l) are not configured by default. <br> <br>Do yo have any ideas of what the problem could be? <br>I created the users using: useradd -m -c “User Name” someuser <br> <br>Thank you very much in advance!