How to configure putty, to reuse the command on top. I remember arrow up or down should enable me to reuse past command.
12 Answers
I do not believe such an option exists for Putty; however, by pressing the up arrow key you can reuse the previous command. You can go through every other command you've typed by clicking the up arrow key repeatedly until you get to the command you want.
1There are two sides to making that work. The client (PuTTY, etc.) needs to encode the key presses in a way the server software (sh, bash, etc.) understands and the server software needs to have attached some meaning to what it receives.
sh is Borne shell. It often doesn't support command history the way you want to use it. (You can tell that the arrow keys aren't being interpreted because you'll get something like ^[[A instead of the expected response.)
You can use chsh to change your shell to something more comfortable as described here. You may need to also figure out which shells are available on the system you're logged in to as you may not be able to install your own. Common shells are bash, ksh, and zsh. Something like which bash should give you the pathname if it exists.