Showing results for 
Search instead for 
Did you mean: 

Putty and HP-UX config

Monty Phillips
Trusted Contributor

Putty and HP-UX config

Novice Putty/HP-UX user here. I've been reading the various threads about using Putty from WIndows to access HP-UX servers.

The problem I am having is that I can not get the "esc" key to work to scroll through last commands, etc. Things like esc-k and esc-j don't work for me.

I think I am missing something obvious so hopefully someone can guide me in the right direction.

Marco A.
Esteemed Contributor

Re: Putty and HP-UX config

Try to use the vi editor ... :

vi editor style:

ESC k will bring the last command on the line, andput you in vi mode (actually, ESC puts you in vi mode, and k recallsthe last issued command).
l moves the cursor one position to the right.
h moves the cursor one position to the left.
k recalls the previous command.
j recalls the next command.
O moves the cursor to the beginning of the line.
$ moves the cursor to the end of the line.
fc finds next character c on the line.
i puts you in input mode.a brings the cursor forward one, then puts you in input mode.A brings the cursor to the end of the line, and puts you in input mode.ESC takes you out of input mode (or beeps if in vi mode).

This style of command line editing is enabled with ...

set -o vi

either in your .profile file, or manually during your logon session.

The previous command can be recalled and automatically executed bytypingron a command line.r [string]will recall and execute the last command used, that began with string.

Hope this helps,

Just unplug and plug in again ....
Piergiacomo Perini
Trusted Contributor

Re: Putty and HP-UX config

Hi Monty,

escuse me for my silly question:
do you have check in
PUTTY configuration
Terminal - Keyboard

if "the Function keys and keypad"
is set to "ESC[ "


Honored Contributor

Re: Putty and HP-UX config


Make sure that the $EDITOR environmental variable is set to 'vi' (this is usually accomplished through ~/.profile).

Mel Burslan
Honored Contributor

Re: Putty and HP-UX config

is this esc-k/j command scrolling working if you login as the same username via another terminal emulator or from the console ? If not, I should say, you need

set -o vi

command somewhere in your .profile but if it is working at other places and not here, then I would check my environment variable, TERM, and also the putty terminal settings, keyboard sub-item.

Hope this helps
UNIX because I majored in cryptology...
Monty Phillips
Trusted Contributor

Re: Putty and HP-UX config

Thanks all for the fast responses and help. Much appreciated.

Major mistake such that I did not have:

export HISTFILE=$HOME/.sh_history
export HISTSIZE=8192

in my .profile!

PLus, the set -o vi helped.

Thanks again to all.