3

I recently upgraded to Ubuntu 14.04 Server Edition. The first thing I noticed is that my bash history seems to be broken. When I press the up arrow I should be able to view my recent commands, however I simply get a ^[[A character instead. Strangely, bash history works perfectly when I am logged in as root, but it does not work when I am logged in as an user.

αғsнιη
  • 35,092
  • 41
  • 129
  • 192
Qwintus
  • 73
  • 1
  • 2
  • 7
  • 1
    Are you sure you are in a bash shell (not, for example, `dash`)? See [Arrow keys, tab-complete not working](http://askubuntu.com/questions/325807/arrow-keys-tab-complete-not-working) – steeldriver Mar 19 '15 at 03:08
  • I think you are right, weird that it is not the default... thanks for your help! – Qwintus Mar 19 '15 at 03:11
  • @Qwintus depends on how you add your user. I think `useradd` uses `sh` as the default, and `adduser` uses `bash` as the default. – muru Mar 19 '15 at 05:26

1 Answers1

1

It might be that the ~/.bash_history file is owned by root. If this is the case use chown as root to give the ownership to yourself.

sudo chown YourUserName ~/.bash_history
αғsнιη
  • 35,092
  • 41
  • 129
  • 192
Ghazanfar
  • 216
  • 1
  • 5