Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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 have Ubuntu 10.04.4 LTS running on a proxmox OpenVZ container.

I imagine it does not come with history because the up arrow on the command line gives me ^[[A


$ history
-sh: history: not found

But I get this when I trying to install.

$ sudo apt-get install history
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package history

What is the correct package name I need to install to get history working?

share|improve this question
up vote 4 down vote accepted

The history command is a feature of bash. For some reason, Your system might be running dash instead of bash. Perhaps, you need to change your login shell to /bin/bash (should have been the default). Type the below command in terminal:

chsh -s /bin/bash

Then, log out and log in.

If you did not install bash in your system, you can install it by the command:

sudo apt-get install bash

Although, you can use other shell like zsh or tcsh (including history).

share|improve this answer

What you are referring to is bash own history, which is typically saved in ~/.bash_history file, and this functionality is embedded into bash itself. No need to install additional packages.

Please have a look at this answer on how to check and enable bash history.

Also, there is a chance that you are not using bash, but some other shell. Use chsh command to change your shell.

share|improve this answer
Thanks it was chsh... had to give it to vine_user for giving me the command line. (+1). – capdragon Jul 18 '12 at 17:33

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.