Problem scenario
When you press the up arrow on the keyboard you see ” ^[[A”. You want to see the previous command that was entered. How do you enable history at the command line?
Solution
Root cause: The /etc/passwd file has an entry like this:
cooluser:x:1001:1002::/home/cooluser:
(This could be caused if you created the user quickly with a useradd command.)
Procedures
Run this command: sudo cat /etc/passwd | grep $(whoami)
Do you see a /bin/bash at the end?
…
Continue reading “How Do You Get the “Up” Arrow to Show a Previous Command in Linux?”