Submitted by Jeff Geerling on December 24, 2010 - 9:59pm
For some time, I was having trouble getting the arrow keys to function correctly in my terminal sessions when logging into one of my remote Linode servers running Ubuntu 10.04. Whenever I pressed an arrow key, instead of moving the cursor or going up and down the command history, I would get a string of gibberish like [[A^[[B^[[D^[[C. Not very helpful!
So, after some searching, I found that the cause for this is an incorrect shell environment being set in the passwd file. To fix this problem, simply edit the /etc/passwd file and change the final string (after the last :) to /bin/bash (it is set to /bin/sh if you create a user via the command line/useradd):
$ sudo nano /etc/passwd
Change this:
<username>:x:1000:1000::/home/<username>/:/bin/sh
to this:
<username>:x:1000:1000::/home/<username>/:/bin/bash
...and then save the file, log out, and log back in. Problem solved!
Comments
Your solution worked for me.
Permalink Submitted by Steve (not verified) on December 30, 2010 - 12:06am.
Your solution worked for me. Thank you very much!
Thanks I was looking for
Permalink Submitted by Thanks (not verified) on May 2, 2011 - 11:47am.
Thanks I was looking for exactly this solution. It's been bugging me for a while.
- Sean McCredie
Your solution worked for me
Permalink Submitted by Gileno (not verified) on November 2, 2011 - 2:09pm.
Your solution worked for me too, Thanks
Add new comment