Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I used to use Up/Down to move through the history of commands. Then, a few days later it changed to Ctrl-p/Ctrl-n. Now this also doesn't work to move through the history of commands entered.

How can I view all these settings or change it? I tried to see the terminal setting by giving the command stty but it was of no help. I searched through Google and found something called bindkey. I hope I am moving in the right direction.

I am not the root user, anyway I would like to know more about this even if could do nothing about it.


**OS Info :**
rcihp145 :/home/msingh2> uname -a
HP-UX rcihp145 B.11.23 U 9000/800 3683851961 unlimited-user license
share|improve this question
If your shell behavior is changing, my guess is that your admin is making changes to the default shell profile /etc/profile. You should contact the admin and ask. If you changed something, anything, you need to describe the change in your question. Please add distro and terminal used too. – bsd Feb 9 '12 at 11:50
hmm..i havnt done any changes, perhaps they are done by admin then – munish Feb 9 '12 at 12:01
set -o emacs is the setting for up/down ctrl-p/ctrl-n but whether the up/down works or not can be changed by .Xresources settings for xterm. Again, if this worked, and then stopped working, something was changed. The xterm faq has the settings for arrow keys (and many others) – bsd Feb 9 '12 at 12:11
@bdowning A system administrator that would change these kind of settings on a regular basic would be a very lousy admin. – Bernhard Feb 9 '12 at 13:01
@Bernhard agreed! – bsd Feb 9 '12 at 13:02
up vote 1 down vote accepted

You are using ksh (the Korn shell). This shell is fairly primitive in terms of command line capabilities, but do check the “key bindings” or “line editing” section to see what your version of ksh can do.

History navigation with Ctrl+P and Ctrl+N works in all ksh versions that I know of. They might be disabled in a configuration file; look in ~/.kshrc to see what has been configured.

There are shells with better and more configurable line edition capabilities: zsh and the more popular but less powerful bash. bindkey is a zsh command, and bind is its bash equivalent.

share|improve this answer
thanks @Gilles you are fantastic – munish Feb 10 '12 at 4:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.