Configure PuTTY for Proper Home/End/PgUp/PgDn Functionality in Bash

bashputty

The keys Home, End, PageUp, PageDown all type a ~ in my bash session instead of moving the cursor / view around. Why does this happen and which settings do I need to change?

GNU bash, version 4.0.28(1)-release (x86_64--netbsd)
PuTTY v0.60

The question originally read:

In PuTTY, why does pressing the "Home" key on the shell (bash) type a "~"? Or rather, how do I make it move the cursor to the start of the command I've typed?

(I thought the reason was that ~ is the home directory, but the answers say this is not so.)

Best Answer

Change the Terminal-type String under the Connection > Data tab from the default “xterm” to “linux”. It worked for me.

enter image description here

Related Question