I have a new Ubuntu remote machine set up, and for some reason my history doesn't work. When I try and use the arrow key I get escape codes. Here is my full .profile file, the 1st line works so I know the file is being read:
PS1='$(whoami):$(pwd)-> '
HISTFILESIZE=2500
As a side note I am using Putty, and it worked fine on a local machine, this new remote machine is located elsewhere in the country. I did try changing the Terminal type from 'xterm' and 'linux' to no avail.
Thanks
If you pressed Up and got
^[[A
, it's probably because the shell on the remote machine doesn't support history. If you runhistory
and it says something likesh: 1: history: not found
, that confirms it. More info here: Why don't my arrow keys work in sh?Also, if you're not sure which shell is in use, run
echo $0
.